CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How to get yPlus field? (https://www.cfd-online.com/Forums/openfoam/233790-how-get-yplus-field.html)

Bartholomew February 11, 2021 14:12

How to get yPlus field?
 
Hi everyone,

I was trying to get the yPlus field in the backwardFacingStep2D tutotial on OpenFOAM. I modified the controlDict and add in "functions" this part:
yPlus
{
type yPlus;
libs (fieldFunctionObjects);
patches (fixedWall);
writeControl timeStep;
writeInterval 100;
writeToFile true;
timeStart 0;
timeEnd 2000;
executeControl timeStep;
executeInterval 1;
}
Then i run
simpleFoam -postProcess -func yPlus
but i have only the min, max and average value for each times step.
My question is: How can i get, in a specific time step, a file with the values of yPlus along (for example) the bottom wall?

Thanks in advance,
Bartholomew

HPE February 11, 2021 16:57

the first one (in controlDict) should produce yPlus field at a given writeInterval. didn't you get it?

Bartholomew February 12, 2021 15:38

Hi,

thank you for your reply. Yes it does. I resolved today the problem: in order to plot the value of y+ along the x-direction i had to take columns from the respective files in the timeInterval (Cx and yPlus) and put them in a common .dat file. I think this is the easiest way to do it.

Bartholomew

HPE February 12, 2021 15:41

Hi,
- try to use `patchEdge` sampledSet for sampling yPlus on patches, if necessary?
- maybe using `nearWallFields` function object could also be interesting?
at least you have solved the main problem - which is good :)

ghazal_1989 June 19, 2021 02:57

Hi Bartolomeo,
I have done the procedure that you have written in controlDict functions. But I got core dump error. Do you have any idea?

************************************************** *******************************
From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]
in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
#3 Foam::functionObjects::yPlus::execute() at ??:?
#4 Foam::functionObjects::timeControl::execute() at ??:?
#5 Foam::functionObjectList::execute() at ??:?
#6 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reactingFoam"
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8 ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/reactingFoam"
Aborted (core dumped)


************************************************** *******************************
Thanks in advance,
Ghazal


All times are GMT -4. The time now is 00:10.