|
[Sponsors] |
How could I access temperature T and density rho from a turbulenceModel library? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 23, 2022, 16:11 |
How could I access temperature T and density rho from a turbulenceModel library?
|
#1 |
New Member
Anuar Giménez
Join Date: Feb 2022
Location: Spain
Posts: 15
Rep Power: 4 |
Hello Foamers,
I am trying to add a temperature dependent viscosity model to use it in a compressible solver (rhoSimpleFoam). For that, I need to modify the CrossPowerLaw model in src/TurbulenceModels/turbulenceModels/laminar/generalizedNewtonian/generalizedNewtonianViscosityModels/CrossPowerLaw and add a Temperature and Density dependent expression. I tried to acces theese variables with: const volScalarField& T = U_.mesh().lookupObject<volScalarField>("T"); const volScalarField& rho = U_.mesh().lookupObject<volScalarField>("rho"); But when I compile i get this error: Code:
CrossWLF.C: In member function ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::laminarModels::generalizedNewtonianViscosityModels::CrossWLF::nu(const volScalarField&, const volScalarField&) const’: CrossWLF.C:119:28: error: ‘U_’ was not declared in this scope; did you mean ‘m_’? 119 | const volScalarField& T = U_.mesh().lookupObject<volScalarField>("T"); | ^~ | m_ CrossWLF.C:119:65: error: expected primary-expression before ‘>’ token 119 | const volScalarField& T = U_.mesh().lookupObject<volScalarField>("T"); | ^ Thank you very much in advance for your help!! |
|
Tags |
openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[openSmoke] libOpenSMOKE | Tobi | OpenFOAM Community Contributions | 562 | January 25, 2023 10:21 |
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion | faizan_habib7 | CFX | 4 | February 1, 2016 18:00 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 09:23 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |