62 GeometricField<Type, fvPatchField, volMesh>& vf,
63 const labelList&
cells
75int main(
int argc,
char *argv[])
79 "Steady-state solver for incompressible, turbulent flow"
80 " of non-Newtonian fluids with duct shape optimisation"
81 " by applying 'blockage' in regions causing pressure loss"
90 #include "createControl.H"
91 #include "createFields.H"
92 #include "initContinuityErrs.H"
99 Info<<
"\nStarting time loop\n" <<
endl;
109 mesh.fieldRelaxationFactor(
"alpha")
119 tmp<fvVectorMatrix>
tUEqn
147 while (
simple.correctNonOrthogonal())
157 if (
simple.finalNonOrthogonalIter())
163 #include "continuityErrs.H"
170 U.correctBoundaryConditions();
189 tmp<fvVectorMatrix> tUaEqn
192 - adjointTransposeConvection
204 solve(UaEqn == -fvc::grad(pa));
210 HbyAa = rAUa*UaEqn.H();
216 while (
simple.correctNonOrthogonal())
220 fvm::laplacian(rAUa, pa) == fvc::div(phiHbyAa)
223 paEqn.setReference(paRefCell, paRefValue);
226 if (
simple.finalNonOrthogonalIter())
228 phia = phiHbyAa -
paEqn.flux();
238 Ua = HbyAa - rAUa*fvc::grad(pa);
239 Ua.correctBoundaryConditions();
248 runTime.printExecutionTime(Info);
Calculates and prints the continuity errors.
tmp< fvVectorMatrix > tUEqn(fvm::ddt(rho, U)+fvm::div(phi, U)+MRF.DDt(rho, U)+turbulence->divDevRhoReff(U)==fvOptions(rho, U))
compressible::turbulenceModel & turbulence
adjustPhi(phiHbyA, U, p_rgh)
Declare and initialise the cumulative ddjoint continuity error.
tmp< volScalarField > rAU
GeometricField< vector, fvPatchField, volMesh > volVectorField
fvMatrix< scalar > fvScalarMatrix
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
fvMatrix< vector > fvVectorMatrix
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
fvScalarMatrix paEqn(fvm::d2dt2(pa) - sqr(c0) *fvc::laplacian(pa))
Execute application functionObjects to post-process existing results.
const dictionary & simple
singlePhaseTransportModel laminarTransport(U, phi)
dimensionedScalar zeroAlpha(dimless/dimTime, Zero)
const labelList & inletCells
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
zeroCells(alpha, inletCells)
dimensionedScalar alphaMax("alphaMax", dimless/dimTime, laminarTransport)
#define forAll(list, i)
Loop across all elements in list.