shallowWaterFoam: Read hU rather than U to support complex e.g. time-varying BCs
Disadvantage is that the BC values have to be specified in terms of hU rather than U. The alternative would be to add complex code to map h and U BCs into the equivalent for hU. Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1566
This commit is contained in:
@ -26,12 +26,12 @@ volScalarField h0
|
||||
dimensionedScalar("h0", dimLength, 0.0)
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
Info<< "Creating field hU\n" << endl;
|
||||
volVectorField hU
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
"hU",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
@ -40,17 +40,18 @@ volVectorField U
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Creating field hU\n" << endl;
|
||||
volVectorField hU
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"hU",
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
h*U,
|
||||
U.boundaryField().types()
|
||||
hU/h
|
||||
);
|
||||
|
||||
Info<< "Creating field hTotal for post processing\n" << endl;
|
||||
@ -68,7 +69,7 @@ volScalarField hTotal
|
||||
);
|
||||
hTotal.write();
|
||||
|
||||
#include "createPhi.H"
|
||||
#include "createPhi.H"
|
||||
|
||||
Info<< "Creating Coriolis Force" << endl;
|
||||
const dimensionedVector F("F", ((2.0*Omega) & gHat)*gHat);
|
||||
|
||||
Reference in New Issue
Block a user