text: /*---------------------------------------------------------------------------*\
  Copyright (C) 2011 OpenFOAM Foundation
  Copyright (C) 2019 Applied CCM Pty Ltd
  -------------------------------------------------------------------------------
  License
      This file is part of CAELUS.
  
      CAELUS is free software: you can redistribute it and/or modify it
      under the terms of the GNU General Public License as published by
      the Free Software Foundation, either version 3 of the License, or
      (at your option) any later version.
  
      CAELUS is distributed in the hope that it will be useful, but WITHOUT
      ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      for more details.
  
      You should have received a copy of the GNU General Public License
      along with CAELUS.  If not, see <http://www.gnu.org/licenses/>.
  
  \*---------------------------------------------------------------------------*/
  
  #include "mxRASLaminar.hpp"
  #include "addToRunTimeSelectionTable.hpp"
  
  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
  
  namespace CML
  {
  namespace mixture
  {
  namespace RASModels
  {
  
  // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
  
  defineTypeNameAndDebug(laminar, 0);
  addToRunTimeSelectionTable(RASModel, laminar, dictionary);
  
  // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
  
  laminar::laminar
  (
      const volScalarField& rho,
      const volVectorField& U,
      const surfaceScalarField& phi,
      const twoPhaseMixture& transport,
      const word& turbulenceModelName,
      const word& modelName
  )
  :
      RASModel(modelName, rho, U, phi, transport, turbulenceModelName)
  {}
  
  
  // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
  
  tmp<volScalarField> laminar::mut() const
  {
      return tmp<volScalarField>
      (
          new volScalarField
          (
              IOobject
              (
                  "mut",
                  runTime_.timeName(),
                  mesh_,
                  IOobject::NO_READ,
                  IOobject::NO_WRITE
              ),
              mesh_,
              dimensionedScalar("mut", mu()().dimensions(), 0.0)
          )
      );
  }
  
  
  tmp<volScalarField> laminar::k() const
  {
      return tmp<volScalarField>
      (
          new volScalarField
          (
              IOobject
              (
                  "k",
                  runTime_.timeName(),
                  mesh_,
                  IOobject::NO_READ,
                  IOobject::NO_WRITE
              ),
              mesh_,
              dimensionedScalar("k", sqr(U_.dimensions()), 0.0)
          )
      );
  }
  
  
  tmp<volScalarField> laminar::epsilon() const
  {
      return tmp<volScalarField>
      (
          new volScalarField
          (
              IOobject
              (
                  "epsilon",
                  runTime_.timeName(),
                  mesh_,
                  IOobject::NO_READ,
                  IOobject::NO_WRITE
              ),
              mesh_,
              dimensionedScalar
              (
                  "epsilon", sqr(U_.dimensions())/dimTime, 0.0
              )
          )
      );
  }
  
  
  tmp<volSymmTensorField> laminar::R() const
  {
      return tmp<volSymmTensorField>
      (
          new volSymmTensorField
          (
              IOobject
              (
                  "R",
                  runTime_.timeName(),
                  mesh_,
                  IOobject::NO_READ,
                  IOobject::NO_WRITE
              ),
              mesh_,
              dimensionedSymmTensor
              (
                  "R", sqr(U_.dimensions()), symmTensor::zero
              )
          )
      );
  }
  
  
  tmp<volSymmTensorField> laminar::devRhoReff() const
  {
      return tmp<volSymmTensorField>
      (
          new volSymmTensorField
          (
              IOobject
              (
                  "devRhoReff",
                  runTime_.timeName(),
                  mesh_,
                  IOobject::NO_READ,
                  IOobject::NO_WRITE
              ),
             -mu()*dev(twoSymm(fvc::grad(U_)))
          )
      );
  }
  
  
  tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
  {
      return
      (
        - fvm::laplacian(muEff(), U)
        - fvc::div(muEff()*dev2(T(fvc::grad(U))))
      );
  }
  
  
  bool laminar::read()
  {
      return RASModel::read();
  }
  
  
  void laminar::correct()
  {
      RASModel::correct();
  }
  
  
  } // End namespace RASModels
  } // End namespace mixture
  } // End namespace CML
  