CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Difference between 'internalField' and 'boundaryField'? (https://www.cfd-online.com/Forums/openfoam/84322-difference-between-internalfield-boundaryfield.html)

CHARLES May 4, 2014 23:36

Thank you very much Armin! You solved my problem! :)

suman91 September 20, 2016 06:29

Accessing nu and nut vales
 
Hi there,

I am currently running a flow over backward facing step (using LES) in OpenFAOM 2.4.0. I want access to the kinematic viscosity. So in a ".H" file which I include in pisoFoam.C, I write the following just to see if I have access to nu (kinematic viscosity) value:

Code:


double k_viscosity;
const scalarField& nuCells = nu().internalField();
forAll(mesh.cells(), celli)
{
    k_viscosity = nuCells[celli];;
    Info<< "nu = " << k_viscosity << endl;
}

But during copiling i get error: "error: ‘nu’ was not declared in this scope"

I also want to access the nut values calculated by openFoam. Is there a function to access it ?

Thanks in advance.


All times are GMT -4. The time now is 14:38.