CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Accessing an entry from an fvPatchScalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2016, 13:24
Default Accessing an entry from an fvPatchScalarField
  #1
New Member
 
Florian
Join Date: Mar 2012
Location: Munich
Posts: 13
Rep Power: 14
Flor is on a distinguished road
Dear Foamers,

I would like to access the scalarField of the roughness height Ks from a patch field of nut. By now I get the fvPatchScalarField

Code:
const fvPatchScalarField& nutField = bottomFvPatch.lookupPatchField<volScalarField, scalar>("nut");
Info << nutField << endl;
This results in the following output:

Code:
type            nutRoughWallFunction;
Cmu             0.09;
kappa           0.41;
E               9.8;
Cs              uniform 0.5;
Ks              uniform 0.001;
value           nonuniform List<scalar> 
350
(
0.000654725
0.000654725
0.000654725
...
Now I would like to continue working with the Ks-field, but somehow I don't get it extracted. I'm thinking of something like

Code:
localKs = nutField.lookupEntry("Ks");
Any hints anyone? Maybe it's possible to cast the fvPatchScalarField into a dictionary?

Thanks in advance!
Florian
Flor is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
meshing of a compound volume in GMSH shawn3531 OpenFOAM 4 March 12, 2015 10:45
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 04:40
rhoSimplecFoam Mach0.8 no pressure values CFDnewbie147 OpenFOAM Running, Solving & CFD 16 November 23, 2013 05:58
Converting Starccm+ mesh Ladnam OpenFOAM 0 September 14, 2011 06:30
add entry to wordList peterwy OpenFOAM Programming & Development 3 October 4, 2010 07:13


All times are GMT -4. The time now is 04:05.