Version 1.2 (June 2013)
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
simulator.geometry.Bulk Class Reference

Define the bulk: an object used to define the environment connected to the simulated system. More...

Inheritance diagram for simulator.geometry.Bulk:
simulator.geometry.FluctEnv

Public Member Functions

 Bulk (Simulator aSim, XMLParser aBulkRoot)
 Creates a bulk compartment object with attributes specified in the protocol file. More...
 
void updateBulk (SoluteGrid[] soluteGrid, SoluteGrid[] reacGrid, double timeStep)
 Updates the bulk solute concentration if the bulk is not constant. More...
 
void updateChemostatBulk (SoluteGrid[] allSol, SoluteGrid[] reacGrid)
 Method to update Bulk solute concentrations during a chemostat setup. More...
 
void updateBulkByReaction (SoluteGrid[] reacGrid, double timeStep)
 Update bulk concentration by reaction, determining reaction rate seen from reaction compartments. More...
 
void updateBulkByGradient (SoluteGrid[] soluteGrid, double timeStep)
 Update bulk concentration on the basis of the flow passed through the interface with the bulk compartment. More...
 
void computeFlow (SoluteGrid aSG, DiscreteVector aDC, ContinuousVector flow)
 Compute massic flow. More...
 
Boolean contains (int soluteIndex)
 Determine if a particular solute is in the bulk. More...
 
double getValue (int soluteIndex)
 Get the value of a particular solute in the bulk. More...
 
void setValue (int soluteIndex, double value)
 Set the value of a particular solute in the bulk. More...
 
String getName ()
 Get the name of this bulk. More...
 
double getTimeConstraint ()
 Return the time constraint of the bulk. More...
 
void writeReport (ResultFile buffer) throws Exception
 Writes a description of the bulk in the result file. More...
 

Public Attributes

Simulator mySim
 
double[] _bulkValue
 
double _D
 
double[] _sIn
 
Boolean[] _isConstant
 

Detailed Description

Define the bulk: an object used to define the environment connected to the simulated system.

The Bulk is an object used to define the environment connected to the simulated system : this environment can impose concentrations on the boundaries (constant boundary) or exchange matter through the boundaries (bulk boundary). A bulk is a perfectly mixed liquid compartment of the system, usually with a larger size than the extent of the simulated biofilm domain. For example, in a wastewater reactor the bulk would refer to the liquid volume being treated. The bulk will usually have a fixed volume, but the volume is not specified here, instead the definition of the computationDomain addresses the bulk compartment volume

Since
August 2006
Version
1.2
Author
Andreas Dötsch (andre.nosp@m.as.d.nosp@m.oetsc.nosp@m.h@he.nosp@m.lmhol.nosp@m.tz-h.nosp@m.zi.de), Helmholtz Centre for Infection Research (Germany)
Laurent Lardon (lardo.nosp@m.nl@s.nosp@m.upagr.nosp@m.o.in.nosp@m.ra.fr), INRA, France
Brian Merkey (brim@.nosp@m.env..nosp@m.dtu.d.nosp@m.k, bvm@n.nosp@m.orth.nosp@m.weste.nosp@m.rn.e.nosp@m.du), Department of Engineering Sciences and Applied Mathematics, Northwestern University (USA)
Sónia Martins (SCM80.nosp@m.8@bh.nosp@m.am.ac.nosp@m..uk), Centre for Systems Biology, University of Birmingham (UK)

Constructor & Destructor Documentation

simulator.geometry.Bulk.Bulk ( Simulator  aSim,
XMLParser  aBulkRoot 
)

Creates a bulk compartment object with attributes specified in the protocol file.

Constructor for the Bulk compartment. For each bulk specified in the protocol file, creates a simulation bulk object with the attributes specified in the XML. This includes storing the information for each solute (initial concentrations, reaction rates, constant/varying concentration levels, and whether pulsed concentrations are employed) in the retrospective array for access in later calculations

Parameters
aSimThe simulation object upon which the scenario specified in the protocol file is beinbg run
aBulkRootThe XML tag objects that sub-nodes of the 'Bulk' tag in the protocol file

Member Function Documentation

void simulator.geometry.Bulk.computeFlow ( SoluteGrid  aSG,
DiscreteVector  aDC,
ContinuousVector  flow 
)

Compute massic flow.

Compute massic flow : g.m-2.time-1

Parameters
aSGa solute grid for a particular solute
aDCPosition on the grid
flowFlow direction
Boolean simulator.geometry.Bulk.contains ( int  soluteIndex)

Determine if a particular solute is in the bulk.

Determine if a particular solute is in the bulk. Uses the index of this solute in the simulation dictionary

Parameters
soluteIndexIndex of solute in the simulation dictionary
Returns
Boolean noting whether this solute is in the bulk (true) or not (false)
String simulator.geometry.Bulk.getName ( )

Get the name of this bulk.

Get the name of this bulk

Returns
String containing the name of this bulk
double simulator.geometry.Bulk.getTimeConstraint ( )

Return the time constraint of the bulk.

Return the time constraint of the bulk

Returns
Double containing the time constraint of this bulk
double simulator.geometry.Bulk.getValue ( int  soluteIndex)

Get the value of a particular solute in the bulk.

Get the value of a particular solute in the bulk. Uses the index of this solute in the simulation dictionary

Parameters
soluteIndexIndex of solute in the simulation dictionary
Returns
Level of this particular solute in the bulk
void simulator.geometry.Bulk.setValue ( int  soluteIndex,
double  value 
)

Set the value of a particular solute in the bulk.

Set the value of a particular solute in the bulk. Uses the index of this solute in the simulation dictionary

Parameters
soluteIndexIndex of solute in the simulation dictionary
valueLevel at which to set the solute level
void simulator.geometry.Bulk.updateBulk ( SoluteGrid[]  soluteGrid,
SoluteGrid[]  reacGrid,
double  timeStep 
)

Updates the bulk solute concentration if the bulk is not constant.

Updates the bulk solute concentration if the bulk is not constant. bvm note 15.12.08: modified routine to allow input of solute grid. bvm note 13.07.09: removed passing-in of 'implicit' flag, and instead set the bulk update method via the XML protocol file

Parameters
soluteGridGrid of all solutes in the simulated system
reacGridGrid of all reactions in the simulated system
timeStepInternal timestep used to update the simulation environment
void simulator.geometry.Bulk.updateBulkByGradient ( SoluteGrid[]  soluteGrid,
double  timeStep 
)

Update bulk concentration on the basis of the flow passed through the interface with the bulk compartment.

Update bulk concentration on the basis of the flow passed through the interface with the bulk compartment

IMPORTANT: this method should ONLY be used to test the updateBulkByReaction routine with FLAT biofilms because this routine does not treat the gradient through the interface correctly. DO NOT USE FOR GENERAL SIMULATIONS

Parameters
soluteGridGrid of all solutes in the simulated system
timeStepInternal timestep used to update the simulation environment
void simulator.geometry.Bulk.updateBulkByReaction ( SoluteGrid[]  reacGrid,
double  timeStep 
)

Update bulk concentration by reaction, determining reaction rate seen from reaction compartments.

Update bulk concentration by reaction, determining reaction rate seen from reaction compartments

Parameters
reacGridAn array of uptake-rates grids in g.L-1.h-1
timeStepInternal timestep used to update the simulation environment
void simulator.geometry.Bulk.updateChemostatBulk ( SoluteGrid[]  allSol,
SoluteGrid[]  reacGrid 
)

Method to update Bulk solute concentrations during a chemostat setup.

Method to update Bulk solute concentrations during a chemostat setup

Author
Sonia Martins 190210
Parameters
allSolGrid of all solutes in the simulated system
reacGridGrid of all reactions in the simulated system
void simulator.geometry.Bulk.writeReport ( ResultFile  buffer) throws Exception

Writes a description of the bulk in the result file.

Writes a description of the bulk in the result file

Parameters
bufferBuffer to which simulation results are being written
Exceptions
ExceptionException thrown if this buffer cannot be written to

Member Data Documentation

double [] simulator.geometry.Bulk._bulkValue

Array containing the initial bulk concentration of each solute in the bulk. RJC 22/8/11 - Made public so that Solver_chemostat can use it to initialise solute concentrations

double simulator.geometry.Bulk._D

Reactor Dilusion rate of the bulk. Used if isConstant is set to false

Boolean [] simulator.geometry.Bulk._isConstant

Array of booleans that note whether the concentration of each specified solute varies over time or remains constant

double [] simulator.geometry.Bulk._sIn

Array of doubles that specify the feed flow concentration of each solute in this simulation (if applicable)

Simulator simulator.geometry.Bulk.mySim

The simulation object being used to simulate the conditions specified in the protocol file


The documentation for this class was generated from the following file: