diff --git a/src/functionObjects/solvers/scalarTransport/scalarTransport.C b/src/functionObjects/solvers/scalarTransport/scalarTransport.C index 84b68341d8d1325d905127761678be8c9277ffd4..641241b91e6cbb2a7e6fd8c64bf966aa0e53eb28 100644 --- a/src/functionObjects/solvers/scalarTransport/scalarTransport.C +++ b/src/functionObjects/solvers/scalarTransport/scalarTransport.C @@ -201,7 +201,7 @@ Foam::functionObjects::scalarTransport::scalarTransport resetOnStartUp_(false), schemesField_("unknown-schemesField"), fvOptions_(mesh_), - bounded01_(dict.lookupOrDefault<bool>("bounded01", true)) + bounded01_(dict.lookupOrDefault<Switch>("bounded01", true)) { read(dict); @@ -235,12 +235,7 @@ bool Foam::functionObjects::scalarTransport::read(const dictionary& dict) dict.readIfPresent("bounded01", bounded01_); schemesField_ = dict.lookupOrDefault("schemesField", fieldName_); - - constantD_ = false; - if (dict.readIfPresent("D", D_)) - { - constantD_ = true; - } + constantD_ = dict.readIfPresent("D", D_); dict.readIfPresent("nCorr", nCorr_); dict.readIfPresent("resetOnStartUp", resetOnStartUp_); @@ -256,11 +251,11 @@ bool Foam::functionObjects::scalarTransport::read(const dictionary& dict) bool Foam::functionObjects::scalarTransport::execute() { - Log << type() << " write:" << endl; - volScalarField& s = transportedField(); - const surfaceScalarField& phi = + Log << type() << " execute: " << s.name() << endl; + + const surfaceScalarField& phi = mesh_.lookupObject<surfaceScalarField>(phiName_); // Calculate the diffusivity diff --git a/src/functionObjects/solvers/scalarTransport/scalarTransport.H b/src/functionObjects/solvers/scalarTransport/scalarTransport.H index e2570fc7f9f805ce3b9a3e83f9d7785be928c946..bc743e7eea2601e965340214ae3a7ab71eb125c0 100644 --- a/src/functionObjects/solvers/scalarTransport/scalarTransport.H +++ b/src/functionObjects/solvers/scalarTransport/scalarTransport.H @@ -111,17 +111,18 @@ Usage \table Property | Description | Required | Default value type | Type name: scalarTransport | yes | - phi | Name of flux field | yes | + field | Name of the scalar field | no | s + phi | Name of flux field | no | phi rho | Name of density field | no | rho - phase | Name of the phase name | no | none + phase | Name of the phase | no | none nut | Name of the turbulence viscosity | no | none D | Diffusion coefficient | no | auto generated nCorr | Number of correctors | no | 0 resetOnStartUp | Reset scalar to zero on start-up | no | no - schemesField | Name of field to specify schemes | no | fieldName + schemesField | Name of field to specify schemes | no | field name fvOptions | List of scalar sources | no | - bounded01 | Bounds scalar between 0-1 for multiphase | no |true - phasePhiCompressed |Compressed flux for VOF | no | alphaPhiUn + bounded01 | Bounds scalar between 0-1 for multiphase | no | true + phasePhiCompressed | Compressed flux for VOF | no | alphaPhiUn \endtable See also @@ -156,10 +157,10 @@ class scalarTransport { // Private data - //- Name of field to process + //- Name of the transport field. word fieldName_; - //- Name of flux field + //- Name of flux field (optional) word phiName_; //- Name of density field (optional) @@ -168,10 +169,10 @@ class scalarTransport //- Name of turbulent viscosity field (optional) word nutName_; - //- Name of phase field + //- Name of phase field (optional) word phaseName_; - //- Name of phase field compressed flux + //- Name of phase field compressed flux (optional) word phasePhiCompressedName_; //- Diffusion coefficient (optional)