]> SALOME platform Git repositories - tools/solverlab.git/blob - CoreFlows/Documentation/functionalities.dox
Salome HOME
Start using profile to deal with 1) boundary conditions and 2) mesh deletion in memory
[tools/solverlab.git] / CoreFlows / Documentation / functionalities.dox
1 /*!
2 \page functionalities Available functionalities  
3
4 \section mesh Meshes
5
6 The simulation requires a mesh \f$M\f$ that can be defined either
7
8 - using the \ref cdmath structured mesh constructor Mesh \f$M(xmin,xmax,nx)\f$
9 - loading a med file generated by \ref salome platform Mesh \f$M\f$ (''  filename '')
10
11 All the boundary faces of the mesh sould be gathered into groups of FACES that will be used to set boundary conditions. These groups of faces can be set
12 - using the \ref cdmath face group generator \a M.setGroupAtPlan(value,direction,tolerance,groupName), where direction is an integer with value \f$0\f$ for the plane \f$x=value\f$, \f$1\f$ for the plane \f$y=value\f$ and \f$2\f$ for the plane \f$z=value\f$
13 - using \ref salome platform when generating the med file
14
15
16 \section Initialdata Initial data or power fields
17 The initial data and power fields can be defined on the simulation mesh using the Field class of \ref cdmath either
18 - starting from a null field using the command Field(fieldname,ON\_CELLS,numberOfComponents), then setting the values on cell \f$i\f$ for each component  \f$j\f$ with the command \f$F(i,j)=fij\f$
19 - loading a field stored in a med file using the command Field(filename,ON\_CELLS, filename)
20
21 The initial data should in general be a vector field containing parameters that are specific to each model
22 - SinglePhase : \f$(p, \vec{v}, T)\f$, ie pressure, velocity, temperature
23 - DriftModel : \f$(c_g, p, \vec{v}, T)\f$, ie phase 1 concentration, pressure, velocity, temperature
24 - IsothermalTwoFluid : \f$(\alpha_g, p,\vec{v}_g,\vec{v}_l)\f$, ie phase 1 void fraction, pressure, phase 1 velocity, phase 2 velocity
25 - FiveEqsTwoFluid : \f$(\alpha_g, p,\vec{v}_g,\vec{v}_l,T)\f$, ie phase 1 void fraction, pressure, phase 1 velocity, phase 2 velocity, common temperature
26 - TransportEquation : \f$h\f$ the fluid enthalpy 
27 - DiffusionEquation : \f$T\f$ the solid temperature
28
29 Whatever the model chosen, the initial data is set with the function ProblemCoreFlows::setInitialField (initialField), and the heat power field is set with the function ProblemCoreFlows::setHeatSource(heatPower) for a constant uniform value or the function ProblemCoreFlows::setHeatSourceField(heatPowerField) for a variable power field.
30
31 \section models Models
32
33 The model can be set as
34
35 - SinglePhase::SinglePhase ( \ref fluidType, \ref pressureEstimate,spaceDimension) where \ref fluidType is either  \ref Liquid or \ref Steam, and \ref pressureEstimate is \ref around1bar300K or \ref around155bars600K
36 - DriftModel::DriftModel (\ref pressureEstimate,spaceDimension) where  pressureEstimate is \ref around1bar300K or \ref around155bars600K
37 - IsothermalTwoFluid::IsothermalTwoFluid (\ref pressureEstimate,spaceDimension) where  pressureEstimate is \ref around1bar300K or \ref around155bars600K
38 - FiveEqsTwoFluid::FiveEqsTwoFluid (\ref pressureEstimate,spaceDimension) where  pressureEstimate is \ref around1bar300K or \ref around155bars600K
39 - TransportEquation::TransportEquation (\ref fluidType, \ref pressureEstimate ,\f$\vec v\f$) where \ref fluidType is either  \ref Liquid or \ref Steam, \ref pressureEstimate is \ref around1bar300K or \ref around155bars600K and\f$\vec v\f$ is the velocity vector assumed constant and of type vector<double>
40 - DiffusionEquation::DiffusionEquation (spaceDim,\f$ \rho, c_p,\lambda\f$) where \f$\rho\f$ is the solid density, \f$c_p\f$ its specific heat and \f$\lambda\f$ its conductivity with default values set for Uranirum
41
42 \section PhyOption Physical options
43 The following physical parameters have default value zero but can be set by the user:
44
45 - In order to set a constant heat source : ProblemCoreFlows::setHeatSource(\f$ heatSource \f$) where heat source is a double
46 - In order to set the viscosities : ProblemFluid::setViscosity(\f$ viscosite \f$ ) where viscosite is a \f$vector<double>\f$ of size nbPhases
47 - In order to set the conductivities : ProblemFluid::setConductivity (\f$ conductivite\f$ ) where conductivite is a \f$vector<double>\f$ of size nbPhases
48 - In order to set the gravity : ProblemFluid::setGravity(\f$ gravite\f$ ) where gravite is a \f$vector<double>\f$ of size spaceDim
49 - In order to set the friction coefficients : ProblemFluid::setDragCoeffs(\f$ dragCoeffs\f$ ) where dragCoeffs is a \f$vector<double>\f$ containing the friction coefficients between fluid and solid in a porous approach for SinglePhase (one coefficient) and DriftModel (two coefficients), or interfacial friction between the two phases for IsothermalTwoFluid (one coefficient) and FiveEqsTwoFluid (one coefficient)
50 - In order to set the heat transfert coefficient between fluid and solid in a porous flow ProblemCoreFlows::setHeatTransfertCoeff (heatCoeff)
51
52 \section NumOption Numerical options
53
54 - The nonlinear formulation can be \ref Roe, \ref VFRoe or \ref VFFC and is set by the method ProblemFluid::setNonLinearFormulation(\ref NonLinearFormulation)
55 - The time discretisation can be \ref Explicit or \ref Implicit, and the space discretisation can be \ref upwind, \ref lowMach, \ref pressureCorrection, \ref staggered or \ref centered. The space and time discretisations can be set using the command ProblemCoreFlows::setNumericalScheme( \ref upwind ,  \ref Explicit ); or ProblemCoreFlows::setNumericalScheme( \ref centered ,  \ref Implicit); for instance. 
56 - Advanced options can be set to enforce a well balanced scheme with ProblemFluid::setWellBalancedCorrection or an entropic scheme  with ProblemFluid::setEntropicCorrection.
57 - In order to set the cfl number: ProblemCoreFlows::setCFL(\f$ cfl \f$ );
58 - In order to set the tolerance number  : ProblemCoreFlows::setPrecision(\f$ precision \f$ );
59 - In order to set the maximum number of time steps : ProblemCoreFlows::setMaxNbOfTimeStep(\f$ MaxNbOfTimeStep\f$ );
60 - In order to set the maximum time of the computation : ProblemCoreFlows::setTimeMax(\f$ maxTime\f$);
61 - In order to set the linear solver and preconditioner : ProblemCoreFlows::setLinearSolver(\ref GMRES, \ref ILU ).
62 The usual linear solvers are \ref GMRES and \ref BICGSTAB, and the usual "preconditionners" are \ref ILU and \ref LU.
63
64
65 \section BoundaryCdts Boundary conditions
66
67 For the numerical treatment of the boundaries, it is important that each boundary (Group in Salome vocabulary) be assigned a \ref BoundaryType.
68
69 Boundary types can be 
70
71 - \ref Wall
72       + simply set with the function SinglePhase::setWallBoundaryCondition, DriftModel::setWallBoundaryCondition, IsothermalTwoFluid::setWallBoundaryCondition, FiveEqsTwoFluid::setWallBoundaryCondition
73       + possible for all fluid models : SinglePhase, DriftModel, IsothermalTwoFluid, FiveEqsTwoFluid
74 - \ref Neumann
75       + simply set with the function ProblemCoreFlows::setNeumannBoundaryCondition
76       + possible for all models
77 - \ref Inlet
78       + simply set with the functions SinglePhase::setInletBoundaryCondition, SinglePhase::setInletBoundaryCondition, DriftModel::setInletBoundaryCondition, IsothermalTwoFluid::setInletBoundaryCondition, FiveEqsTwoFluid::setInletBoundaryCondition or TransportEquation::setInletBoundaryCondition
79       + possible for TransportEquation, SinglePhase, DriftModel, IsothermalTwoFluid, FiveEqsTwoFluid
80 - \ref Outlet
81       + simply set with the command ProblemFluid::setOutletBoundaryCondition
82       + possible for all fluid models : SinglePhase, DriftModel, IsothermalTwoFluid, FiveEqsTwoFluid
83 - \ref Dirichlet
84       + simply set with the command DiffusionEquation::setDirichletBoundaryCondition
85       + possible for DiffusionEquation
86
87 The former way to set the boundary conditions was to create a C++ map \f$map<string, LimitField> boundaryFields\f$ that associates the boundary name to a field. Once the map is filled with the appropriate content, the boundary conditions are set with the command ProblemCoreFlows::setBoundaryFields(boundaryFields).
88 The LimitField structure is specific to each model and each type of boundary condition.
89 - for a Neumann boundary condition :  LimitField limitNeumann; limitNeumann.bcType=Neumann;
90
91 - for an Inlet boundary condition (not possible for DiffusionEquation): LimitField limitInlet; limitInlet.bcType=Inlet; then
92       + For TransportEquation: 
93                 - limitInlet.h=1.3e6
94       + For SinglePhase (3D case):
95           - limitInlet.T = 600; 
96           - limitInlet.v\_x = \f$vector<double>(1,0)\f$;
97           - limitInlet.v\_y = \f$vector<double>(1,0)\f$;
98           - limitInlet.v\_z = \f$vector<double>(1,0)\f$; 
99
100      + For DriftModel (3D case):
101           - limitInlet.c=0;     
102           - limitInlet.T = 600; 
103           - limitInlet.v\_x = \f$vector<double>(1,0)\f$;
104           - limitInlet.v\_y = \f$vector<double>(1,0)\f$;
105           - limitInlet.v\_z = \f$vector<double>(1,0)\f$;
106
107      + For IsothermalTwoFluid Model (3D case):  
108           - limitInlet.alpha=0; 
109           - limitInlet.v\_x = \f$vector<double>(2,0)\f$;
110           - limitInlet.v\_y = \f$vector<double>(2,0)\f$;        
111           - limitInlet.v\_z = \f$vector<double>(2,0)\f$;
112
113      + For FiveEqsTwoFluid (3D case):           
114           - limitInlet.alpha=0; 
115           - limitInlet.T = 600; 
116           - limitInlet.v\_x = \f$vector<double>(2,0)\f$;        
117           - limitInlet.v\_y = \f$vector<double>(2,0)\f$;        
118           - limitInlet.v\_z = \f$vector<double>(2,0)\f$; 
119
120      + then boundaryFields['' \a Inlet'']= limitInlet;  
121
122 - for an Outlet boundary condition (for fluid models): LimitField limitOutlet; limitOutlet.bcType=Outlet; then
123       + For all fluid models (SinglePhase, DriftModel, IsothermalTwoFluid, FiveEqsTwoFluid:             
124           - limitOutlet.p = 155e5;
125       + then boundaryFields[''\a outlet'']= limitOutlet;
126       
127 - for a Wall with friction and/or heat conduction : LimitField limitWall; limitWall.bcType=Wall; then
128       + For SinglePhase (3D case): 
129           - limitWall.T = 600;  
130           - limitWall.v\_x = \f$vector<double>(1,0)\f$; 
131           - limitWall.v\_y = \f$vector<double>(1,0)\f$;         
132           - limitWall.v\_z = \f$vector<double>(1,0)\f$;
133       + For DriftModel (3D case):               
134           - limitWall.T = 600;  
135           - limitWall.v\_x = \f$vector<double>(1,0)\f$; 
136           - limitWall.v\_y = \f$vector<double>(1,0)\f$; 
137           - limitWall.v\_z = \f$vector<double>(1,0)\f$;
138       + For IsothermalTwoFluid Model (3D case): 
139           - limitWall.v\_x = \f$vector<double>(2,0)\f$;
140           - limitWall.v\_y = \f$vector<double>(2,0)\f$;
141           - limitWall.v\_z = \f$vector<double>(2,0)\f$;
142       + For FiveEqsTwoFluid (3D case):          
143           - limitWall.T = 600;
144           - limitWall.v\_x = \f$vector<double>(2,0)\f$; 
145           - limitWall.v\_y = \f$vector<double>(2,0)\f$; 
146           - limitWall.v\_z = \f$vector<double>(2,0)\f$; 
147       + Then boundaryFields['' \a Wall '']= limitWall;  
148
149 - for a Dirichlet boundary condition (only for DiffusionEquation) : LimitField limitDirichlet; limitDirichlet.bcType=Dirichlet; then
150         - limitDirichlet.T = 600; 
151         - boundaryFields['' \a Dirichlet'']= limitDirichlet; 
152
153
154 */
155