|
[Sponsors] |
October 16, 2018, 11:56 |
Viscosity assignment in viscosity model
|
#1 |
Member
Martin
Join Date: Dec 2011
Posts: 40
Rep Power: 14 |
Hi everyone!
I am taking as a template the viscosityModel class to write a class for magnetic materials constitutive laws. I have some VERY BASIC doubts about the handling of the viscosity in, for example, the Newtonian model. The code is: Code:
Foam::viscosityModels::Newtonian::Newtonian ( const word& name, const dictionary& viscosityProperties, const volVectorField& U, const surfaceScalarField& phi ) : viscosityModel(name, viscosityProperties, U, phi), nu0_("nu", dimViscosity, viscosityProperties_), nu_ ( IOobject ( name, U_.time().timeName(), U_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), U_.mesh(), nu0_ ) {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // bool Foam::viscosityModels::Newtonian::read ( const dictionary& viscosityProperties ) { viscosityModel::read(viscosityProperties); viscosityProperties_.lookup("nu") >> nu0_; nu_ = nu0_; return true; } i) Does the operator >> in Code:
viscosityProperties_.lookup("nu") >> nu0_ ii) If nu_ is a private volScalarField and nu0_ is a dimensionedScalar, why the line mur_ = mur0_ works? Thanks in advance! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 07:18 |
Viscosity model - error: object is not allocated - C++ beginner | avila.vc | OpenFOAM Programming & Development | 5 | February 14, 2022 02:00 |
Using a new implemented viscosity model with simpleFoam | TemC | OpenFOAM Running, Solving & CFD | 6 | March 8, 2017 03:07 |
Wrong multiphase flow at rotating interface | Sanyo | CFX | 14 | February 7, 2017 17:19 |
modelling solids viscosity in eulerian multiphase model | derkaiser | FLUENT | 1 | December 5, 2011 03:42 |