61 #include "rhoThermo.H" 62 #include "interfaceProperties.H" 63 #include "twoPhaseMixture.H" 64 #include "twoPhaseMixtureThermo.H" 65 #include "turbulenceModel.H" 66 #include "turbulentFluidThermoModel.H" 67 #include "pimpleControl.H" 68 #include "fixedFluxPressureFvPatchScalarField.H" 70 extern "C"{
void dsteqr_(
char &,
int *,
double *,
double *,
double *,
int *,
double *,
int *); }
85 int main(
int argc,
char *argv[])
88 #include "setRootCase.H" 89 #include "createTime.H" 90 #include "createMesh.H" 91 #include "createTimeControls.H" 93 #include "readGravitationalAcceleration.H" 95 pimpleControl pimple(mesh);
97 #include "readTimeControls.H" 98 #include "initContinuityErrs.H" 100 #include "CourantNo.H" 101 #include "setInitialDeltaT.H" 102 bool gellingPoint =
false;
105 Info<<
"\nStarting time loop\n" << endl;
106 Info<<
"initialFoamMass : " << initialFoamMass << endl;
107 while (runTime.run())
109 #include "readTimeControls.H" 110 #include "CourantNo.H" 111 #include "setDeltaT.H" 115 Info<<
"Time = " << runTime.timeName() << nl << endl;
118 while (pimple.loop())
120 if (simulationTarget ==
"mold-filling")
124 alpha1.weightedAverage(mesh.V()).value() > 0.01
125 && gellingPoint == false
130 if (pimple.corr() == 1)
136 solve(fvm::ddt(rho) + fvc::div(rhoPhi));
158 while (pimple.correct())
166 if (pimple.turbCorr())
168 turbulence->correct();
174 if (gellingPoint ==
false)
179 if (pimple.corr() == 1)
187 solve(fvm::ddt(rho) + fvc::div(rhoPhi));
207 while (pimple.correct())
215 if (pimple.turbCorr())
217 turbulence->correct();
224 Info<<
"\nMass of foam: " 225 << fvc::domainIntegrate(alpha2*rho_foam)
231 Info<<
"ExecutionTime = " 232 << runTime.elapsedCpuTime()
235 Info<<
"finalFoamMass : " 236 << fvc::domainIntegrate(rho_foam*alpha2)
238 Info<<
"End\n" << endl;
builds the RHS of PDEs for the moments.
allocate memory for the surrogate models
converts moments based on the unit volume of foam
three different functions for growth rate
builds and solves moments equations
builds and solves conversion equations based on the kinetic model chosen.
functions for kinetics calculations
checks the boundedness of field variables related to the physical and chemical blowing agents...
source term due to bubble growth
checks the boundedness of alpha (phase volume fraction)
builds the RHS of conversion equations based on the kinetics model chosen.
source term due to bubbles coalescence
builds and solves the temperature equation
implementatino of three rheology models including constant, Newtonian, and non-Newtonian ...
creates all the required field variables.
calculates and reports the continuity error
builds the RHS of PDEs for the blowing agents.
calculates the PU foam density
int main(int argc, char *argv[])
Reads parameters. Creates struts and walls. Saves foam morphology to a file.
constant coalescence kernel
builds the RHS of temperature equation
checks if the gelling point reaches.
checks the boundedness of temperature values
instantiates the surrogate models
builds the PDEs for the presence of different blowing agents. It also considers the user choice for t...
builds and solves pressure equation