GIT: Initial state after latest Foundation merge

This commit is contained in:
Andrew Heather
2016-09-20 14:49:08 +01:00
4571 changed files with 115696 additions and 74609 deletions

View File

@ -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
@ -52,6 +52,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "fvOptions.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,6 +67,7 @@ int main(int argc, char *argv[])
simpleControl simple(mesh);
#include "createFields.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -77,10 +79,16 @@ int main(int argc, char *argv[])
while (simple.correctNonOrthogonal())
{
solve
fvScalarMatrix TEqn
(
fvm::ddt(T) - fvm::laplacian(DT, T)
==
fvOptions(T)
);
fvOptions.constrain(TEqn);
TEqn.solve();
fvOptions.correct(T);
}
#include "write.H"

View File

@ -1,4 +1,4 @@
if (runTime.outputTime())
if (runTime.writeTime())
{
volVectorField gradT(fvc::grad(T));

View File

@ -43,7 +43,7 @@ word pName("p");
// Update name of the pressure field from the command-line option
args.optionReadIfPresent("pName", pName);
// Infer the pressure BCs from the velocity BCs
// Infer the pressure BCs from the velocity
wordList pBCTypes
(
U.boundaryField().size(),
@ -78,62 +78,36 @@ volScalarField p
pBCTypes
);
label pRefCell = 0;
scalar pRefValue = 0.0;
if (args.optionFound("writep"))
{
setRefCell
(
p,
potentialFlow.dict(),
pRefCell,
pRefValue
);
}
Info<< "Constructing velocity potential field Phi\n" << endl;
autoPtr<volScalarField> PhiPtr;
IOobject io
// Infer the velocity potential BCs from the pressure
wordList PhiBCTypes
(
"Phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
if (io.typeHeaderOk<volScalarField>())
forAll(p.boundaryField(), patchi)
{
PhiPtr.reset(new volScalarField(io, mesh));
}
else
{
// Cannot just use p.boundaryField().types() since does not initialise
// complex boundary types. Instead re-clone them from p.
io.readOpt() = IOobject::NO_READ;
PhiPtr.reset
(
new volScalarField
(
io,
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
p.boundaryField().types()
)
);
const volScalarField::GeometricBoundaryField& bp = p.boundaryField();
volScalarField::GeometricBoundaryField& bPhi = PhiPtr().boundaryField();
forAll(bp, patchI)
if (p.boundaryField()[patchi].fixesValue())
{
bPhi.set(patchI, bp[patchI].clone(PhiPtr().dimensionedInternalField()));
PhiBCTypes[patchi] = fixedValueFvPatchScalarField::typeName;
}
}
volScalarField& Phi = PhiPtr();
Info<< "Constructing velocity potential field Phi\n" << endl;
volScalarField Phi
(
IOobject
(
"Phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
PhiBCTypes
);
label PhiRefCell = 0;
scalar PhiRefValue = 0;

View File

@ -28,7 +28,9 @@ Group
grpBasicSolvers
Description
Potential flow solver.
Potential flow solver which solves for the velocity potential
from which the flux-field is obtained and velocity field by reconstructing
the flux.
\heading Solver details
The potential flow solution is typically employed to generate initial fields