diff --git a/applications/solvers/incompressible/shallowWaterFoam/createFields.H b/applications/solvers/incompressible/shallowWaterFoam/createFields.H index 05dce1b3210b3bcf65b1948d46c82c1ea7f96c55..3bcfb683526db7f73a79c7306093fba390c4f6a2 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/createFields.H +++ b/applications/solvers/incompressible/shallowWaterFoam/createFields.H @@ -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); diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/0/U b/tutorials/incompressible/shallowWaterFoam/squareBump/0/U deleted file mode 100644 index 75b2a00ac26df48a3bf47bac9536686bc399c9e4..0000000000000000000000000000000000000000 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/0/U +++ /dev/null @@ -1,44 +0,0 @@ -/*--------------------------------*- 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; - } -} - - -// ************************************************************************* // diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/0/hU b/tutorials/incompressible/shallowWaterFoam/squareBump/0/hU new file mode 100644 index 0000000000000000000000000000000000000000..134b60f778ae5502e58a0241e1c501a059371d9c --- /dev/null +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/0/hU @@ -0,0 +1,448 @@ +/*--------------------------------*- 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; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/system/setFieldsDict b/tutorials/incompressible/shallowWaterFoam/squareBump/system/setFieldsDict index ab438aafa7ecbc5da8efcac379bf9d25b57ed246..bd0c70dbff6350005adff2b337a3f35386bb2fbb 100644 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/system/setFieldsDict +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/system/setFieldsDict @@ -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) ); } );