|
[Sponsors] |
How to change a dimensionedScalar into volScalarField |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 25, 2019, 13:05 |
How to change a dimensionedScalar into volScalarField
|
#1 |
New Member
|
Hello,
I am using one RAS model (Hellsten-EARSM from Furst's GIT repository) to make some changes into it. In the transport equation maker function, I want to change a few coefficients (zeta_, beta_, and alphaD_) from its type [dimensionedScalar] to another type [volScalarField] to make it compatible with the rest of the code in its original code. Original Code: Code:
volScalarField gamma( this->gamma(fMix) ); volScalarField beta( this->beta(fMix) ); volScalarField alphaD( this->alphaD(fMix) ); Changes I made which are producing error: Code:
volScalarField zeta( this->zeta_ ); volScalarField beta( this->beta_ ); volScalarField alphaD= this->alphaD_ ; I am attaching changed files also: So, how can I change its type? Thank you for your time for reading this. Purn Last edited by purnp2; May 25, 2019 at 16:45. |
|
May 25, 2019, 16:51 |
|
#2 |
New Member
|
One possible solution (which, I guess, is not correct even though it compiles and run) is as follows:
I used a formula: Code:
tmp<volScalarField> blend ( const volScalarField& fMix, const dimensionedScalar& psi ) const { return fMix*(psi)/fMix; } Is it an acceptable solution? I am hoping for a solution where I can use any standard function of foam:: like: Code:
typedef GeometricField<scalar, fvPatchField, volMesh> volScalarField |
|
May 30, 2019, 10:46 |
|
#3 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
Have a look e.g. at https://github.com/OpenFOAM/OpenFOAM...ewtonian.C#L54
Code:
nu_ ( IOobject ( name, U_.time().timeName(), U_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), U_.mesh(), nu0_ ) Code:
volScalarField nu_ ( IOobject ( "name", U_.time().timeName(), U_.db(), IOobject::NO_READ, IOobject::NO_WRITE ), U_.mesh(), nu0_ ) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No matching function error: Phase change source term added to interMixingFoam | wavefunction | OpenFOAM Programming & Development | 2 | February 4, 2022 08:46 |
how to change boundaryType in volScalarField | gaza | OpenFOAM Programming & Development | 6 | October 20, 2017 08:35 |
Compressible 2D airfoil rhoSimpleFoam fatal error volScalarField none | jfournier | OpenFOAM Running, Solving & CFD | 4 | September 28, 2017 07:28 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
converting from dimensionedScalar to volScalarField | shash | OpenFOAM Running, Solving & CFD | 7 | July 11, 2012 06:02 |