mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Initial commit after latest foundation merge
This commit is contained in:
@ -13,7 +13,7 @@ volVectorField U
|
||||
);
|
||||
|
||||
// Initialise the velocity internal field to zero
|
||||
U = dimensionedVector("0", U.dimensions(), vector::zero);
|
||||
U = dimensionedVector("0", U.dimensions(), Zero);
|
||||
|
||||
surfaceScalarField phi
|
||||
(
|
||||
@ -25,13 +25,13 @@ surfaceScalarField phi
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(U) & mesh.Sf()
|
||||
fvc::flux(U)
|
||||
);
|
||||
|
||||
if (args.optionFound("initialiseUBCs"))
|
||||
{
|
||||
U.correctBoundaryConditions();
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
phi = fvc::flux(U);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -172,8 +172,7 @@ int main(int argc, char *argv[])
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
Info<< "Interpolated velocity error = "
|
||||
<< (sqrt(sum(sqr((fvc::interpolate(U) & mesh.Sf()) - phi)))
|
||||
/sum(mesh.magSf())).value()
|
||||
<< (sqrt(sum(sqr(fvc::flux(U) - phi)))/sum(mesh.magSf())).value()
|
||||
<< endl;
|
||||
|
||||
// Write U and phi
|
||||
|
||||
@ -91,10 +91,10 @@ int main(int argc, char *argv[])
|
||||
fvOptions(T)
|
||||
);
|
||||
|
||||
TEqn.relax();
|
||||
fvOptions.constrain(TEqn);
|
||||
|
||||
TEqn.solve();
|
||||
|
||||
fvOptions.correct(T);
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Reference in New Issue
Block a user