ENH: Updated construction/retrieval of gravity field. See #1094

This commit is contained in:
Andrew Heather
2018-11-14 21:49:32 +00:00
parent 1a4fceec20
commit d1bc53b77e
28 changed files with 116 additions and 165 deletions

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -25,6 +25,7 @@ License
#include "icoUncoupledKinematicCloud.H"
#include "singlePhaseTransportModel.H"
#include "gravityMeshObject.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -54,18 +55,7 @@ Foam::functionObjects::icoUncoupledKinematicCloud::icoUncoupledKinematicCloud
)
:
fvMeshFunctionObject(name, runTime, dict),
g_
(
IOobject
(
"g",
time_.constant(),
mesh_,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
dimensionedVector("g", dimAcceleration, Zero) // Needs name
),
g_(meshObjects::gravity::New(time_)),
laminarTransport_
(
mesh_.lookupObject<singlePhaseTransportModel>("transportProperties")