Lymph nodes and Peyer’s patches play a key role in the development of an appropriate and efficient immune response. Once an Antigen (Ag) is detected inside the host organism it must be presented to specific lymphocytes to trigger an immune response. The recognition process has to be highly efficient: at most in few hours it is necessary to find specific lymphocytes inside a repertoire that includes about 10 millions different receptors. The way nature organized itself to accomplish this goal represents a intriguing fine-tuned mechanism, based on a careful balance between diffusion properties, chemotaxis and receptor expression.


Lymph nodes (LNs) are the scene of this process. Antigens are carried to LNs where all lymphocytes periodically transit

in order to check for new antigens and to get the appropriate costimulation. Human lymph nodes are bean-shaped structures that range in size from a few millimeters to about 1-2 cm in their normal state. In a lymph node it is possible to distinguish two main regions: the medulla and the cortex. The first one is a labyrinth of medullary sinuses, that drain up lymph, and medullary cords, rich in plasma cells and macrophages. The cortex can be further divided in an outer and an inner part, according to their very different properties. The internal part called paracortex is rich in T lymphocytes and is often called T-cells area. The outer area, called node cortex includes the B-area consists of follicles and germinal centersers where B cells are activated and differentiate. T and B areas are identified by high concentration of different chemokines secreted by local stromal cells.


Inside the paracortex, interactions between T cells and Dendritic Cells (DC) take place whereas in the follicles the germinal centers formate. Finally, the whole structure is surrounded by an external capsule, made of collagen and a subcapsular sinus. The lymph flows into the LN through the afferent lymphatic vessels, carrying macrophages, dendritic cells and some lymphocytes to the node cortex and the medulla, before leaving via the efferent lymphatic vessels. Most T and B cells, however, enter the LN mainly from the blood, through high endotelial venules (HEV) located inside the paracortex. This mechanism is highly efficient and ∼ 2% of the recirculating poll is recruited in a day by a single LN.


Once inside the lymph node, B and T cells rapidly home in their own compartments, following a specific chemotactic gradient. In absence of an antigenic challenge, T and B cells move randomly. Entrance of antigens into the LN triggers a series of events leading to recognition and activation of an immune response. The immune response is initiated inside the T cell area of the lymph node, where naıve TH cell first encounter DC, that present an antigen. Pathways for antigen delivery to the lymph node may be different, depending on antigen properties, size and solubility. Dendritic cells usually pick up antigens in peripheral tissues and migrate to the LN in order to present the MHC-peptide complex to T cells. In particular, after antigen recognition, dendritic cells undergo a change in the expression of their receptors: those specific for inflammatory chemokines are progressively lost whereas the expression of the lymphoid ones, especially the CCR7 receptor, is increased. As a consequence, DCs are rapidly driven towards the T cell area, where the probability to meet specific TH cells is higher, thus increasing Ag-presentation efficiency. B cells enter the lymph node via HEVs and pass through follicles in response to the CXCR5 chemokine. If activated by antigenic stimulation they proliferate and remain in the LN. Unstimulated B cells, instead, pass rapidly through the LN to return to the general circulation.


Lymphocytes egress is still subject of investigation. Recent articles suggest that the Sphingosine-1-phosphate (S1P) molecule could control lymphocytes exit through efferent lymphatic vessels. S1P is a molecule produced in lymph and plasma in high concentration whereas it is low-expressed inside lymphoid organs. In blood it is produced essentially by red blood cells whereas the presence of S1P in lymph is mainly due to a distinct source, well localized near the lymph node exit. Its specific receptor, S1P1 , has been proved to be essential for lymphocytes egress from lymph nodes. The current emerging view is that the receptor S1P1 acts as a sort of “pass” to exit the LN. Cells that have the S1P receptor expressed can leave the secondary lymphoid organ whereas the others are retained inside an immune response. In spite of the large number of studies, many aspects of lymphocytes traffic and Ag presentation are not fully understood and many questions are still under debate. For example: is a balanced chemokines responsiveness sufficient to explain the timing of B and TH cell encounter at the boundary of T and B areas? A computer model of the lymph node, which codes for the current knowledge on the topic, can be an useful tool to answer some of these questions.

Lymph Node structure


The current version of the model describes the lymph node as composed by three regions: a T cell area (i.e., the paracortex) a B cell area (i.e., inside the node cortex), plus a region (i.e., the medulla) consisting of the exits conducting to the effererent vessel (see Figure). A number of follicules are located in the node cortex. Naıve T and B cells enter the LN through several high endotelial venules (HEV), randomly distributed inside the T cell area, and quite efficiently localize in the correct compartment following the gradient of their specific chemokine. This is possible since cell entities are provided with specific receptors that allow them to feel the concentration of particular chemotactic molecules that guide their motion towards the right direction. In the model the afferent vessels enter on the node cortex.  Antigen delivery to secondary lymphoid organs may follow a variety of different pathways, depending on antigen structure, size and solubility.


The current model includes the description of two possible mechanisms for antigens delivery, based on a passive or active (i.e., cell-aided) transport mechanism. Antigens may enter the LN either as soluble antigen, through a specific conduit system, or in association with dendritic cells, through an afferent lymphatic vessel.  Soluble antigens are the first to reach the LN; the conduit network is a very efficient delivery system that can bring antigens directly to the LN within minutes after their injection. Once inside the secondary lymphoid organ, soluble antigens are primarily detected by resident DC that can digest and present the MHCII-peptide complex to the TH cells. Alternatively, a soluble Ag can be captured by a B cell inside the lymph node. Naive B cells are thought to primarily recognize intact protein antigens that have entered the B-cell-rich follicular area of the lymph node. B-DC interactions are not explicitly taken into account in the model but B cells are allowed to capture and present soluble antigens also inside T area, on their way to follicles. Extra-follicular-activation is therefore allowed but it is not mediated by DCs. A second wave of antigens presentations takes place 8-12h later, when another population of dendritic cells start to arrive from the periphery, carrying the antigen. In our model when a dendritic cell enters the LN in its presenting state, its CCR7 receptor is already expressed. Once inside the LN, therefore, DCs can immediately feel the chemokine released in the T cell area and move rapidly towards this region, where they have more chances to encounter a naive Ag-specific TH cells and activate them. Following activation, some TH cells can, in turn, become sensible to a specific chemokine (i.e., MDC) released directly by dendritic cells. In such way, the probability of a second encounter among Ag-specific T cell and DC increases and T cell clone expansion is promoted (about one day after Ag injection. Currently, daughter TH cells are in the naive state and do not feel MDC until they are activated. B activation by TH cell is also helped and controlled by chemotaxis. When a B cell is ready to present the Ag, it gives up the CXCR5 receptor and activates the CCR7 one. B cells are thus redirected towards the overlay region between the T and B area, where T-B cells encounters can take place. After a successful interaction with Ag-specific T cells, B cells start cloning, approximatively one or two days after Ag injection. At the current stage, B cells differentiation into plasma B cells is not included into the model.  These gates are randomly distributed in the lymph node occupying a finite region that we sketch as the medulla zone in Figure). Moreover, these gates open and close according to a certain mechanism. The role of S1P and its receptor in the control of lymphocytes egress is schematized as follow: once a lymphocyte is found at an exit site, its S1P1 receptor is checked and, if it is active, the lymphocyte is allowed to leave the LN with a certain probability. Otherwise it is retained inside the volume, When a T or B cell succeeds in recognizing the Ag, their S1P receptor is de-activated. In such way, specific lymphocytes can not leave the lymph node before receiving the right costimulation to mount an immune response. Once mature, the lymphocyte’s S1P receptor is activated again and Ag-specific cells can finally leave the LN. After cloning, in the current model, mother cells are allowed to leave the LN (S1P receptor is on), whereas daughter cells still have the S1P receptor inactive and stay inside the LN to boost the immune response. At present, DCs exit is not regulated by the S1P-mechanism. DC cells simply exit when the gate is open, without any check on the expression of the S1P1 receptor. A possible DC responsiveness to S1P has been suggested but it has not been confirmed yet. The number of the exit areas and the exit probability have been chosen so that, in absence of an antigen challenge, about 25% of lymphocytes leave the LN in one day. The incoming and outgoing lymphocytes fluxes have been balanced in order to keep the total population approximatively constant. The continuous lymphocytes entry and exit assure that the repertoire is always refreshed. During an infection, such an equilibrium is broken as lymphocytes recruitment from the periphery is increased, in order to assure a faster scanning of the repertoire. When the infection is over, lymphocytes recruitment come back to the normal values and the original LN population is recovered. A suitable lymphocyte density is established before Ags are injected inside the LN so to achieve a correct response timing. Ags are injected for 3 days at random time, roughly four times a day. LN expansion is not taken into account since it is mainly due do the swelling of the fibroplastic reticulum more than to the increase of the number of lymphocytes. The effect of the infection can be seen in the increasing of the total number of cells inside the volume.

Schematic representation of the LN: T cell area (i.e., the paracortex) and a B-cell area (i.e., the node cortex). A number of follicules  are located in the node cortex, whereas the T cell area occupies the inner part. The medulla consists of a part of the T-area that allows cells to exit by the effererent vessel. T and B cells enter the LN mainly from the blood, throught HEV i located inside the paracortex (see text).

Code availability

The C-source code is available as a tar-ball here: lymph-node-source.tar.gz


To compile the program type

    gcc -O3 -o homing homing.c rand48.c

or simply


The executable file is called 'homing'.


To run the program

  ./homing -t dt -n timesteps -r seed


  dt = Time step of the simulation in minutes

The time step should be chosen greater than 20 minutes and smaller than 7 hours.  A time step of 30 minutes is recommended for optimal results.

  timesteps = number of  simulation steps.

This is a positive integer number, greater than 0.  The corresponding real time in minutes is given by timesteps * dt .

  seed = random seed

This program is stochastic and a seed must be provided in order to initialize the random number generator. Seed must be a positive integer number.

For example

    ./homing -t 30 -n 500 -r 9763


The program generates different ascii data files. Their content is described below.

_*_details.out contain the number of B, TH and DC cells during the simulation. The fraction of cells in the different internal states is specified.  Legends are provided at the beginning of each file.

The flux of cells leaving the lymph node is also registered in the files _*_exit.out, where the total number of B, TH and Dc cells that live the LN at each timestep is recorded.

The file _ag-details.out contains information on the number of free antigens inside the lymph node at time t.

The file _grid.dat specify the cartesian coordinates of the grid points used for the simulation.  The volume of the lymph node is fixed to 4 microliters but the number of grid points depends on the time step chosen.  The smaller is the time step, the larger is the grid size.

Files named _cells_*.out gives the evolution of the spatial distribution of cells inside the grid. By default this option is not

active as this greatly slow down the speed of execution.  Therefore files _cells_*.out are generally empty.  This option can be activated in the source file uncommented some lines inside the function SaveDetails3D.  The same is true for the file _Ag.out that specify the spatial distribution of free antigens inside the LN.


Use the gnuplot script 'plotall.plt' to plot the population dynamics

    gnuplot> call 'plotall.plt' 0 dt

where 'dt' is that used in the run (for example dt=30).