Skip to content
Snippets Groups Projects

ENH: Arrhenius viscocity model for incompressible viscocity,

Merged Sergio Ferraris requested to merge feature-Arrhenius-viscocity-energyFO into master
6 unresolved threads

energyTransport FO for incompressible single and multiple phase flows and viscousDissipation fvOption source. Tutorial to show the use of energyTransport: multiphase/multiphaseInterFoam/laminar/mixerVessel2D Tutorial to show viscousDissipation: compressible/rhoPimpleFoam/RAS/TJunction

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
15
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23
24 \*---------------------------------------------------------------------------*/
25
26 #include "energyTransport.H"
27
28 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
29
30 bool Foam::fv::energyTransport::read(const dictionary& dict)
  • Why is this not implemented and also in different namespace? This looks to me to be something that was accidentally added (ie, the entire file, which is mentioned in Make/files either).

  • Please register or sign in to reply
  • Mark OLESEN
    Mark OLESEN @mark started a thread on the diff
  • 86 return tmp<volScalarField>();
    87 }
    88
    89
    90 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
    91
    92 Foam::fv::viscousDissipation::viscousDissipation
    93 (
    94 const word& sourceName,
    95 const word& modelType,
    96 const dictionary& dict,
    97 const fvMesh& mesh
    98 )
    99 :
    100 option(sourceName, modelType, dict, mesh),
    101 UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
  • Mark OLESEN
    Mark OLESEN @mark started a thread on the diff
  • 69 word UName_;
    70
    71 //- Name of the rho field for incompressible solvers
    72 word rhoName_;
    73
    74 //- Density for single phase flows
    75 dimensionedScalar rho_;
    76
    77
    78 // Private Member Functions
    79
    80 //- Return the viscocity field
    81 tmp<volSymmTensorField> devRhoReff() const;
    82
    83 //- Disallow default bitwise copy construct
    84 viscousDissipation(const viscousDissipation&);
  • Mark OLESEN
    Mark OLESEN @mark started a thread on the diff
  • 68 )
    69 );
    70
    71 if (rho_.value() > 0)
    72 {
    73 return trho;
    74 }
    75 else if (rhoName_ != "none")
    76 {
    77 trho.ref() = mesh_.lookupObject<volScalarField>(rhoName_);
    78 return trho;
    79 }
    80 else
    81 {
    82 FatalErrorInFunction
    83 << " Neither rhoName nor rho are specified."
  • Mark OLESEN
    Mark OLESEN @mark started a thread on the diff
  • 120
    121 if (fieldNames_.size() != 1)
    122 {
    123 FatalErrorInFunction
    124 << "settings are:" << fieldNames_ << exit(FatalError);
    125 }
    126
    127 applied_.setSize(fieldNames_.size(), false);
    128 }
    129
    130
    131 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
    132
    133 Foam::tmp<Foam::volSymmTensorField> Foam::fv::viscousDissipation::
    134 devRhoReff() const
    135 {
    • Can also have logic like this:

      // Incompressible
      {
          const incompressible::turbulenceModel* model =
              mesh.lookupObjectPtr<incompressible::turbulenceModel>
              (
                  turbulenceModel::propertiesName
              );
      
          if (model)
          {
              return tmp<volSymmTensorField>
              (
                   new volSymmTensorField(rho() * model->devRhoReff())
              );
          }
      }
      
      // Compressible
      {
          const compressible::turbulenceModel* model =
              mesh.lookupObjectPtr<compressible::turbulenceModel>
              (
                  turbulenceModel::propertiesName
              );
      
          if (model)
          {
              return tmp<volSymmTensorField>
              (
                   new volSymmTensorField(model->devRhoReff())
              );
          }
      }
      
      FatalErrorInFunction
          << " The turbulence model is not found in the database."
          << exit(FatalError);
      
      return tmp<volSymmTensorField>();
      Edited by Mark OLESEN
    • Please register or sign in to reply
  • Mark OLESEN
    Mark OLESEN @mark started a thread on the diff
  • 45 Foam::viscosityModels::Arrhenius<ViscousModel>::Arrhenius
    46 (
    47 const word& name,
    48 const dictionary& viscosityProperties,
    49 const volVectorField& U,
    50 const surfaceScalarField& phi
    51 )
    52 :
    53 ViscousModel(name, viscosityProperties, U, phi),
    54 ArrheniusCoeffs_
    55 (
    56 viscosityProperties.optionalSubDict(typeName + "Coeffs")
    57 ),
    58 alpha_("alpha", inv(dimTemperature), ArrheniusCoeffs_),
    59 Talpha_("Talpha", dimTemperature, ArrheniusCoeffs_),
    60 fieldName_(ArrheniusCoeffs_.lookupOrDefault<word>("fieldName","T")),
  • How does your devRhoReff compare in values (temperature increase) with rhoEpsilonEff() - eg from 2.3.x src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C

  • merged

  • Mark OLESEN mentioned in merge request !148 (merged)

    mentioned in merge request !148 (merged)

  • Andrew Heather mentioned in merge request !149 (closed)

    mentioned in merge request !149 (closed)

  • Please register or sign in to reply
    Loading