Define the computation domain: an evenly spaced rectilinear grid described by its dimensionality (2D or 3D) More...
Public Member Functions | |
Domain (Simulator aSim, XMLParser cdRoot) | |
Creates a computation domain compartment object with attributes specified in the protocol file. More... | |
SoluteGrid | createGrid (String gridName, double defaultValue) |
Creates a solute or species grid and initialises the values within that grid. Used to create boundary and biomass grids. More... | |
void | applyAllBoundary () |
Applies all specified domain boundaries to this computation domain one by one. More... | |
AllBC | testCrossedBoundary (ContinuousVector newLoc) |
Test if a given location is outside a boundary. Used to detect the crossed boundary when moving an agent. More... | |
AllBC | testCrossedBoundarySelfAttach (ContinuousVector newLoc) |
Test if a given location is outside a boundary other than the bottom. Used in self-attach scenarios. More... | |
void | addBoundary (AllBC aBC) |
Add a boundary condition to the list of boundaries on this domain. More... | |
LinkedList< AllBC > | getAllBoundaries () |
Return all the boundary conditions applicable to this domain. More... | |
void | calculateTopOfBoundaryLayer () |
Creates an array list containing the 'i' coordinate of the computation domain that is the top of the boundary layer. More... | |
void | refreshBioFilmGrids () |
Refresh relative diffusivity and boundary layer grids to ensure biomass updated this step is included. More... | |
void | calculateComputationDomainGrids () |
Calculates the diffusivity and boundary layer grid levels. More... | |
LinkedList< DiscreteVector > | getBorder () |
Returns a list of discrete vectors that specify the limit of the boundary layer. More... | |
double[] | getInterface () |
Creates a list of doubles with the heights of the biofilm/liquid interface. Used for writing simulation statistics. More... | |
double | getLongestSize () |
Return longest side of this domain. More... | |
double | getResolution () |
Return the resolution of this domain. More... | |
SpatialGrid | getGrid () |
Returns the domain grid. More... | |
String | getName () |
Return the name of this domain. More... | |
boolean | is3D () |
Determine if the simulation is recreating a 3D environment. More... | |
SoluteGrid | getDiffusivity () |
Return the diffusivity grid associated with this domain. More... | |
SoluteGrid | getBoundaryLayer () |
Return the boundary layer grid associated with this domain. More... | |
SoluteGrid | getBiomass () |
Return the biomass grid associated with this domain. More... | |
void | printTopOfBoundaryLayerArray () |
Used in testing to check the top of the boundary layer was calculated correctly. More... | |
void | printBoundaryLayer () |
Used in testing to view the boundary layer matrix for a set part of the domain. More... | |
void | printBioMassGrid () |
Used in testing to view the biomass matrix for a set part of the domain. More... | |
Public Attributes | |
String | domainName |
double | length_X |
double | length_Y |
double | length_Z |
boolean | is3D |
int | _nI |
int | _nJ |
int | _nK |
double | _resolution |
double[][] | _topOfBoundaryLayer |
SoluteGrid | _biomassGrid |
Protected Member Functions | |
int | checkDilationRadius (int n, int m, int l) |
Sets the value of a grid space in the boundary layer, indicating whether the space is part of the boundary layer, or biomass is present. More... | |
final int | cyclicIndex (int val, int limit) |
For cyclic boundaries, returns the index of the grid space on the opposite side of the boundary. More... | |
Protected Attributes | |
Simulator | currentSim |
int | _i |
int | _j |
int | _k |
SpatialGrid | _domainGrid |
SoluteGrid | _boundaryLayer |
SoluteGrid | _diffusivityGrid |
double | _dilationBand |
double | specificArea |
double | _biofilmDiffusivity = 1d |
Define the computation domain: an evenly spaced rectilinear grid described by its dimensionality (2D or 3D)
The computation domain is an evenly spaced rectilinear grid described by its dimensionality (2D or 3D), its size, geometry and the behaviour at its boundaries. See Figure 1 of the Lardon et al paper (2011) for a good description on how this is divided into several regions - the support, the bulk, the biofilm matrix, and the diffusion boundary layer.
Creates a computation domain compartment object with attributes specified in the protocol file.
The computation domain is an evenly spaced rectilinear grid described by its dimensionality (2D or 3D), its size, geometry and the behaviour at its boundaries. See Figure 1 of the Lardon et al paper (2011) for a good description on how this is divided into several regions - the support, the bulk, the biofilm matrix, and the diffusion boundary layer. The definition within the computationDomain markup of the protocol file notes how these regions are set up. This constructor sets up each computation domain that is specified in the protocol file.
aSim | The simulation object upon which the scenario specified in the protocol file is being run |
cdRoot | The XML tag objects that sub-nodes of the 'Bulk' tag in the protocol file |
void simulator.geometry.Domain.addBoundary | ( | AllBC | aBC | ) |
Add a boundary condition to the list of boundaries on this domain.
Add a boundary condition to the list of boundaries on this domain
aBC | Boundary condition to add to the list of boundaries |
void simulator.geometry.Domain.applyAllBoundary | ( | ) |
Applies all specified domain boundaries to this computation domain one by one.
This method should be used when you have finished to register all boundary conditions; this function will populate a 3-D matrix. Apply all boundaries one after one ; a point is outside of the computational domain if it is declared outside by at least one of the Boundary Conditions
void simulator.geometry.Domain.calculateComputationDomainGrids | ( | ) |
Calculates the diffusivity and boundary layer grid levels.
Calculates the diffusivity and boundary layer grid levels. In previous versions of iDynoMiCS this method could be found within refreshBioFilmGrids. This has been moved here as, with the addition of self attachment, this method needs to be called before agent initialisation. KA May 2013
void simulator.geometry.Domain.calculateTopOfBoundaryLayer | ( | ) |
Creates an array list containing the 'i' coordinate of the computation domain that is the top of the boundary layer.
Creates an array list containing the 'i' coordinate of the computation domain that is the top of the boundary layer. Note that this is in the resolution specified by the 'resolution' parameter in the computation domain section of the protocol file, and this may need to be adjusted if being used in calculations where the resolution differs
|
protected |
Sets the value of a grid space in the boundary layer, indicating whether the space is part of the boundary layer, or biomass is present.
Sets the value of a grid space in the boundary layer, indicating whether the space is part of the boundary layer, or biomass is present
n | The N coordinate of the grid to check whether this square is in the boundary |
m | The M coordinate of the grid to check whether this square is in the boundary |
l | The L coordinate of the grid to check whether this square is in the boundary |
SoluteGrid simulator.geometry.Domain.createGrid | ( | String | gridName, |
double | defaultValue | ||
) |
Creates a solute or species grid and initialises the values within that grid. Used to create boundary and biomass grids.
Creates a solute or species grid and initialises the values within that grid. Used to create boundary and biomass grids
gridName | The name of the grid being created (e.g. boundaryLayer / totalBioMass) |
defaultValue | The default value to assign to all grid spaces |
|
protected |
For cyclic boundaries, returns the index of the grid space on the opposite side of the boundary.
For cyclic boundaries, returns the index of the grid space on the opposite side of the boundary
val | The integer grid spqce to check |
limit | The limit of the grid |
LinkedList<AllBC> simulator.geometry.Domain.getAllBoundaries | ( | ) |
Return all the boundary conditions applicable to this domain.
Return all the boundary conditions applicable to this domain
Implements simulator.geometry.IsComputationDomain.
SoluteGrid simulator.geometry.Domain.getBiomass | ( | ) |
Return the biomass grid associated with this domain.
Return the biomass grid associated with this domain
Implements simulator.geometry.IsComputationDomain.
LinkedList<DiscreteVector> simulator.geometry.Domain.getBorder | ( | ) |
Returns a list of discrete vectors that specify the limit of the boundary layer.
Returns a list of discrete vectors that specify the limit of the boundary layer
Implements simulator.geometry.IsComputationDomain.
SoluteGrid simulator.geometry.Domain.getBoundaryLayer | ( | ) |
Return the boundary layer grid associated with this domain.
Return the boundary layer associated with this domain
Implements simulator.geometry.IsComputationDomain.
SoluteGrid simulator.geometry.Domain.getDiffusivity | ( | ) |
Return the diffusivity grid associated with this domain.
Return the diffusivity grid associated with this domain
Implements simulator.geometry.IsComputationDomain.
SpatialGrid simulator.geometry.Domain.getGrid | ( | ) |
Returns the domain grid.
Returns the domain grid
Implements simulator.geometry.IsComputationDomain.
double [] simulator.geometry.Domain.getInterface | ( | ) |
Creates a list of doubles with the heights of the biofilm/liquid interface. Used for writing simulation statistics.
Creates a list of doubles with the heights of the biofilm/liquid interface. Used for writing simulation statistics. This routine is very basic in that it just captures the overall height (x-position) of each point from the nearest carrier, but for most cases it should be sufficient)
double simulator.geometry.Domain.getLongestSize | ( | ) |
Return longest side of this domain.
Return longest side of this domain
String simulator.geometry.Domain.getName | ( | ) |
Return the name of this domain.
Return the name of this domain
Implements simulator.geometry.IsComputationDomain.
double simulator.geometry.Domain.getResolution | ( | ) |
Return the resolution of this domain.
Return the resolution of this domain
boolean simulator.geometry.Domain.is3D | ( | ) |
Determine if the simulation is recreating a 3D environment.
Determine if the simulation is recreating a 3D environment
void simulator.geometry.Domain.printBioMassGrid | ( | ) |
Used in testing to view the biomass matrix for a set part of the domain.
Used in testing to view the biomass matrix for a set part of the domain. KA 210513
void simulator.geometry.Domain.printBoundaryLayer | ( | ) |
Used in testing to view the boundary layer matrix for a set part of the domain.
Used in testing to view the boundary layer matrix for a set part of the domain. KA 210513
void simulator.geometry.Domain.printTopOfBoundaryLayerArray | ( | ) |
Used in testing to check the top of the boundary layer was calculated correctly.
Used in testing to check the top of the boundary layer was calculated correctly. KA 210513
void simulator.geometry.Domain.refreshBioFilmGrids | ( | ) |
Refresh relative diffusivity and boundary layer grids to ensure biomass updated this step is included.
Method to refresh relative diffusivity and boundary layer grids to ensure biomass updated this step is included. Used in the creation of output files
Implements simulator.geometry.IsComputationDomain.
AllBC simulator.geometry.Domain.testCrossedBoundary | ( | ContinuousVector | newLoc | ) |
Test if a given location is outside a boundary. Used to detect the crossed boundary when moving an agent.
Test if a given location is outside a boundary. Used to detect the crossed boundary when moving an agent
newLoc | The location to test |
Implements simulator.geometry.IsComputationDomain.
AllBC simulator.geometry.Domain.testCrossedBoundarySelfAttach | ( | ContinuousVector | newLoc | ) |
Test if a given location is outside a boundary other than the bottom. Used in self-attach scenarios.
Test if a given location is outside a boundary other than the bottom. For self-attachment, the simulation detects a swimming agent may have crossed the substratum boundary and will then assume that agent attaches. However we need to check that move has not crossed any of the other boundaries, else that move is invalid. To do this, all boundaries are checked. If using the method above, y0z could still be returned and thus we end up in a loop. Thus this has had to be adapted so this cannot be returned
newLoc | The new location of this swimming agent |
|
protected |
Factor used to decrease solute diffusivity inside the biofilm. Multiplicative factor applied to the diffusivity in water
SoluteGrid simulator.geometry.Domain._biomassGrid |
Grid to hold total biomass in a particular area
|
protected |
Boundary layer between bulk and biofilm
|
protected |
Diffusivity of solutes in each area of this domain
|
protected |
Band between the boundary and bulk, capturing change in diffusivity and solute levels
|
protected |
The solute grid that is a component of this computation domain
|
protected |
|
protected |
|
protected |
int simulator.geometry.Domain._nI |
Number of grid elements in the x direction
int simulator.geometry.Domain._nJ |
Number of grid elements in the y direction
int simulator.geometry.Domain._nK |
Number of grid elements in the z direction
double simulator.geometry.Domain._resolution |
Width of each side of the grid element (in micrometres)
double [][] simulator.geometry.Domain._topOfBoundaryLayer |
Array to hold the X position that is the top of the boundary layer in each of the Y and Z positions. Used for self-attach scenarios
|
protected |
The simulation object being used to simulate the conditions specified in the protocol file
String simulator.geometry.Domain.domainName |
Name of this computation domain, as supplied in the specified protocol file
boolean simulator.geometry.Domain.is3D |
Whether this computation domain is two or three dimensional
double simulator.geometry.Domain.length_X |
Domain X dimension in micrometers
double simulator.geometry.Domain.length_Y |
Domain Y dimension in micrometers
double simulator.geometry.Domain.length_Z |
Domain Z dimension in micrometers
|
protected |
The ratio between the carrier surface (the substratum on which the biofilm grows) and the bulk compartment volume. The physical volume of the system that appears in the simulation definition. In m2/m3.