This Folder contains the Matlab files used to simulate blood flow and oxygen transport in the retina associated with the publication “LRG1 initiates the onset of diabetic retinopathy in mice”. For more information on the methods used and context (including scope, funding and specific acknowledgement), please refer to the dedicated supplementary material or contact maxime.berg@ucl.ac.uk (alt. maxime.berg@cnrs.fr) or giulia.derossi@ucl.ac.uk.

This folder contains main_demo.m, a simulation demonstration with parameters, discretisation and boundary conditions similar to the one used in the publication. The simulation is performed using a reconstructed microvascular retina network used in the publication, which is provided in the folder and labeled as “retina_demo_network.am”.

The folder also contains three subfolders themselves containing the sources:

* Preprocessing - functions mainly relating to:
    - File reading and network construction
    - Creation of connectivity table for the network
    - Boundary condition and parameter set-up 

* Flow - functions mainly relating to:
    - computing the pressure distribution across nodes of the network
    - computing the flow rate distribution across segments of the network
    - computing the discharge hematocrits distribution across segments of the network

* Transport - functions mainly relating to:
    - computing the oxygen concentration in the network (nodes and segment)
    - computing the oxygen concentration in the tissue 

* Postprocessing - functions mainly relating to:
    - displaying the network geometry
    - displaying the pressure, flow rate and discharge hematocrits distribution
    - displaying the intra- and extra vascular concentration of oxygen
    - A library for custom colormap useful for displaying the results 
        - cmap.m taken from Erik Kvaleberg (2025). Custom colormap (https://www.mathworks.com/matlabcentral/fileexchange/42450-custom-colormap), MATLAB Central File Exchange. Retrieved 	September 26, 2025) 
        - rgb.m Kristjan Jonasson (2025). RGB triple of color name, version 2 (https://www.mathworks.com/matlabcentral/fileexchange/24497-rgb-triple-of-color-name-version-2), MATLAB 		Central File Exchange. Retrieved September 26, 2025.

Each function in each folder is briefly described in their respective header

The demo was designed and run using Matlab 2022a. 