solveSolid.H
Go to the documentation of this file.
1 {
2  fvScalarMatrix hEqn
3  (
5  - (
6  thermo.isotropic()
7  ? fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
8  : fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
9  )
10  ==
11  fvOptions(rho, h)
12  );
13 
14  hEqn.relax();
15 
16  fvOptions.constrain(hEqn);
17 
18  if (coupled)
19  {
20  fvMatrixAssemblyPtr->addFvMatrix(hEqn);
21  }
22  else
23  {
24  Info<< "\nSolving for solid region "<< solidRegions[i].name() << endl;
25 
26  if (finalIter)
27  {
28  mesh.data::add("finalIteration", true);
29  }
30 
31  hEqn.solve(mesh.solver(h.select(finalIter)));
32 
33  fvOptions.correct(h);
34 
35  thermo.correct();
36 
37  Info<< "Min/max T:" << min(thermo.T()).value() << ' '
38  << max(thermo.T()).value() << endl;
39 
40  if (finalIter)
41  {
42  mesh.data::remove("finalIteration");
43  }
44  }
45 }
fvMatrix< scalar > fvScalarMatrix
Definition: fvMatricesFwd.H:37
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:40
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:487
PtrList< fvMesh > solidRegions(solidNames.size())
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:40
fv::options & fvOptions
psiReactionThermo & thermo
Definition: createFields.H:28
tmp< volSymmTensorField > taniAlpha
dynamicFvMesh & mesh
tmp< GeometricField< Type, faPatchField, areaMesh > > laplacian(const GeometricField< Type, faPatchField, areaMesh > &vf, const word &name)
Definition: facLaplacian.C:40
const volScalarField & betav
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:26
const dimensionedScalar h
Planck constant.
autoPtr< fvMatrix< scalar > > fvMatrixAssemblyPtr
messageStream Info
Information stream (stdout output on master, null elsewhere)