Skip to content
Snippets Groups Projects
Commit 67e8bd8b authored by Henry's avatar Henry
Browse files

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
parent bbc223d2
Branches
Tags
No related merge requests found
......@@ -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);
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0.1 0 0);
boundaryField
{
sides
{
type slip;
}
inlet
{
type fixedValue;
value uniform (0.1 0 0);
}
outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object hU;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField nonuniform List<vector>
400
(
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.0009 0 0)
(0.0009 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.0009 0 0)
(0.0009 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
(0.001 0 0)
)
;
boundaryField
{
sides
{
type slip;
}
inlet
{
type fixedValue;
value uniform (0.001 0 0);
}
outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
......@@ -18,7 +18,7 @@ defaultFieldValues
(
volScalarFieldValue h0 0
volScalarFieldValue h 0.01
volVectorFieldValue U (0.1 0 0)
volVectorFieldValue hU (0.001 0 0)
);
regions
......@@ -31,6 +31,7 @@ regions
(
volScalarFieldValue h0 0.001
volScalarFieldValue h 0.009
volVectorFieldValue hU (0.0009 0 0)
);
}
);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment