CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Writing y (https://www.cfd-online.com/Forums/openfoam-solving/57824-writing-y.html)

christian May 14, 2007 07:03

How do I write y+ (so that I c
 
How do I write y+ (so that I can plot y+ in paraFoam) when not running LES?

Best regards,
Christian Svensson

mattijs May 15, 2007 03:29

Have a look at the checkYPlus
 
Have a look at the checkYPlus postprocessing utility.

christian May 15, 2007 03:40

This is what I've done. From w
 
This is what I've done. From what I can see checkYPlus only reports the y+ values, it doesn't write them to a file so that I can plot them in paraFoam. How can I do this? yPlusLES has this feature.

Regards,
Christian

gschaider May 15, 2007 04:07

Two possibilities (first is be
 
Two possibilities (first is better):

a) Adopt the difference between checkYPlus and yPlusLES into a new utility
b) use the two utilities I'm posting below (behave like original checkYPlus, with the -write option yPlus gets written to a field (only for wall-patches)

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif checkYPlusIncompressible.tgz
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif checkYPlusCompressible.tgz

christian August 23, 2007 07:08

When using the yPlusLES utilit
 
When using the yPlusLES utility I don't get any values in the yPlus file. It simply says:

pipe
{
type calculated;
value uniform 0;
}
etc.

What is wrong? Grateful for a quick response.

Best regards,
Christian Svensson

hadi August 23, 2007 07:37

Hi christian, I am new to o
 
Hi christian,

I am new to openFoam too, but maybe i can help!
Did you modify yPlusLES utility?
Are u trying to calculate a mean value over a boundary?

Cheers
Hadi

christian August 23, 2007 07:41

No I haven't modified the yPlu
 
No I haven't modified the yPlusLES utility. I'm running it in its original shape. However, I don't get any result data in the yPlus file of the time step directory.

hadi August 23, 2007 08:03

Your yPlus value is uniform ov
 
Your yPlus value is uniform over the boundary and is equal to zero:
type calculated;
value uniform 0;!!
In this utility you calculate yPlus as following :
if (typeid(currPatch) == typeid(wallFvPatch))
{
yPlus.boundaryField()[patchi] =
d[patchi]
*sqrt
(
nuEff.boundaryField()[patchi]
*mag(U.boundaryField()[patchi].snGrad())
)
/sgsModel->nu().boundaryField()[patchi];
}
Y+ = Y*sqrt(nueff*gradU)/nu
usually u get "value uniform 0" on a boundary; when it is not a wall.
Try wallGradU utility to see if u will have the same problem.
Can you tell me about the geometry and boundary conditions

christian August 23, 2007 08:20

wallGradU gives me a lot of ve
 
wallGradU gives me a lot of vector values for each of my boundaries as expected.

The geometry is a pipe containing plate with a hole, like a throttle. The pipe and throttle are walls with a uniform 0 velocity. The inlet is mapped from a RANS computation and the outlet is a pressure outlet.

Can't understand why I don't get any yPlus values using yPlusLES???

christian August 23, 2007 08:33

I realised what was wrong. In
 
I realised what was wrong. In my boundary file, the type of my wall boundaries was set to "patch". When I changed them to "wall" everything works fine. Thanks for taking the time to help me.

/ Christian

paka September 27, 2007 21:47

I'm using rasInterFoam solver
 
I'm using rasInterFoam solver and I want to calculate y+ for tested cases. Could anyone help here?
When I try to run it, first it says p field is missing. This is not a problem, cause I use an utility which calculates real pressure producing "p" field. Then in the next step it says there is trouble in what follows:


Create mesh for time = 0

Time = 0
Reading field p

Reading field U

Reading/calculating face flux field phi



--> FOAM FATAL IO ERROR : keyword transportModel is undefined in dictionary "/share/kiwiraid/krystian/OpenFOAM/krystian-1.4/run/tutorials/icoFoam/cavity/./c onstant/transportProperties"

file: /share/kiwiraid/krystian/OpenFOAM/krystian-1.4/run/tutorials/icoFoam/cavity/./co nstant/transportProperties from line 25 to line 25.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 146.

FOAM exiting


Which clearly shows that transportProperties file differs from what was assumed initially.

Could anyone please provide some tip what to fix in order to make it run with rasInterFoam solver or interFoam solver (definition files for transport properties are the same) or perfectly modify the code so it will be workable with mentioned solvers?

BTW. For what solvers was checkYPlus tool done initially? I tried to run with some of other solvers including LES, but something is still wrong. I'm using OpenFOAM 1.4 version. Might it be a problem that checkYPlus doesn't work with newer versions?

Many very thanks,
Krystian

paka September 27, 2007 21:54

Actually, there is some proble
 
Actually, there is some problem reading 'p' field too. Hmm... So any input is greatly welcomed.

Thanks,
Krystian

hadi September 28, 2007 03:58

Hello Krystian, Which utili
 
Hello Krystian,

Which utility did you use to calculate y+?

hadi

paka September 28, 2007 05:11

I tried to use checkYPlus, how
 
I tried to use checkYPlus, however didn't work as I mentioned. Just in case I also tried to use the other related tool, made for LES, and also the one for incompressible flow attached in this topic. Neither of those worked.

hadi September 28, 2007 06:02

If you want to calculate y+. y
 
If you want to calculate y+. you should be running a turbulent solver, it will not work for icoFoam since it is a solver for laminar flow, try to use turbFoam, or the adequate turbulent solver for your case.
About rasInterFoam, i don't know this solver but apparently you don't have a P file, i am not sure if u can modify it.

CheckYPlus does not work for LES solvers!

Hadi

paka September 28, 2007 16:32

Yes, I figured that out that c
 
Yes, I figured that out that checkYPlus in not for LES, there is other tool for LES.

Even if the p field is created, then I think appears problem with transportProperties dictionary, since it specifies two phases.

Any other input? thanks,
Krystian

mighelone October 14, 2007 11:16

Hello! I'm trying to compile
 
Hello!
I'm trying to compile the checkYPlusCompressible utility posted in this discussion with OpenFOAM 1.4.1, but I obtain the following errors:

Making dependency list for source file checkYPlusCompressible.C
SOURCE=checkYPlusCompressible.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/specie/lnInclud e -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/combustion/lnIn clude -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/basic/lnInclude -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/chemistryModel/ lnInclude -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/turbulenceModels -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/transportModels -IlnInclude -I. -I/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/checkYPlusCompressible.o
checkYPlusCompressible.C: In function 'int main(int, char**)':
checkYPlusCompressible.C:171: error: no matching function for call to 'Foam::fixedValueFvPatchField<double>::fixedValueF vPatchField(const Foam::fvPatch&, Foam::Field<double>&)'
/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:87: note: candidates are: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::DimensionedField<type,>&) [with Type = double]
/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:76: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&) [with Type = double]
/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:66: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fixedValueFvPatchField<type>&, const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::fvPatchFieldMapper&) [with Type = double]
/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:53: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&, const Foam::dictionary&) [with Type = double]
/home/michele/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/fixedValueFvPat chField.C:41: note: Foam::fixedValueFvPatchField<type>::fixedValueFvPa tchField(const Foam::fvPatch&, const Foam::DimensionedField<type,>&) [with Type = double]
make: *** [Make/linuxGccDPOpt/checkYPlusCompressible.o] Error 1

Does someone have compiled this utility with the latest OpenFOAM release?

Michele

gschaider October 15, 2007 04:13

Well. That removes the calcula
 
Well. That removes the calculation/writing of yPlus for the wall-patches (that code had to be changed for 1.4.1). I will post an updated version later in the day.

Bernhard

mighelone October 15, 2007 06:08

thank you Bernhard! I don't
 
thank you Bernhard!

I don't understand the real function of the code that I've commented, but the remaining part of the utility satisfies my needs, since it checks the value of Yplus on every bondary wall, creating a YPlus field in time directory.

Michele

gschaider October 15, 2007 14:50

Hi Michele! The 1.4.1-ready
 
Hi Michele!

The 1.4.1-ready code can be downloaded via Subversion with the command
svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breede r/utilities/postProcessing/YPlusWithWrite

You're right. I'm not quite sure of the purpose of the offending code (seems I was trying to be too clever (trying to make sure that the wall-Patches are fixedValue-patches). But I'll have a look, before I remove it.

Bernhard

louisgag August 22, 2008 12:35

"I realised what was wrong. In
 
"I realised what was wrong. In my boundary file, the type of my wall boundaries was set to "patch". When I changed them to "wall" everything works fine. Thanks for taking the time to help me. "

thank you for reporting that, I had the same problem with yPlusRAS.

vishal September 25, 2008 06:53

Hi, I am unable to get y+ usi
 
Hi,
I am unable to get y+ using checkYPlus utility command
it throws me an error as command not found.

I am currently working on suse linur operating system.
Please help me in this matter.

Thanks
VIshal

vishal September 25, 2008 07:01

Hi, i have also downloaded
 
Hi,

i have also downloaded and kept the chechyPlusCompressible.C file and Make file
can any one please tell me where is the exact location to place it and do i have to compile the entire program again.

Thanks
Vishal

louisgag September 25, 2008 10:11

Hi Vishal, If you are using
 
Hi Vishal,

If you are using OF 1.5 the utilities to check yplus are yPlusLES and YplusRAS.

regards,

-Louis

mabinty February 19, 2009 05:43

Dear all!! I adapted the yP
 
Dear all!!

I adapted the yPLusRAS utility for a compressible case (yPLusRASCompressible) and it seems to work (at least I believe so ...). As I m currently working with a multi region solver (chtMultiRegionFoam) I need to adapt it further, so that yPlus is calculated/written only in the fluid region. I couldn t figure out yet how to realize that yPLusRASCompressible follows the structure of the time directories "timeName/fluidRegionName" (e.g. 51/topAir) to access the needed fields for the calculation of yPLaus in the fluidRegionName region. I would greatly appreciate any hint on that! Thx in advance,
Aram

mabinty February 27, 2009 04:55

Hi!! I managed to make yPLu
 
Hi!!

I managed to make yPLusRASCompressible to follow the structure of the time directories and the code compiles now. But when executing the utility
I get the error message shown below at the point where thermophysical properties are read:

Time = 1.001
Reading field p

Reading thermophysical properties

Selecting thermodynamics package hThermo>>>>

Not Implemented
Trying to construct an genericFvPatchField on patch air_to_ceiling of
field h#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::genericFvPatchField::genericFvPatchField(Foa m::fvPatch
const&, Foam::DimensionedField const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libfiniteVolume.so"
#3 Foam::fvPatchField::addpatchConstructorToTable >::New(Foam::fvPatch
const&, Foam::DimensionedField const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libfiniteVolume.so"
#4 Foam::fvPatchField::New(Foam::word const&, Foam::fvPatch const&,
Foam::DimensionedField const&) at
~/OpenFOAM/OpenFOAM-1.5.x/src/finiteVolume/lnInclude/newFvPatchField.C:70
#5
Foam::GeometricField::GeometricBoundaryField::Geom etricBoundaryField(Fo am::fvBoundaryMesh const&, Foam::DimensionedField const&, Foam::List const&) in "/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#6 Foam::GeometricField::GeometricField(Foam::IOobjec t const&,
Foam::fvMesh const&, Foam::dimensionSet const&, Foam::List const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#7 Foam::hThermo > > > >::hThermo(Foam::fvMesh const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#8 Foam::basicThermo::addfvMeshConstructorToTable > > > >
> >::New(Foam::fvMesh const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#9 Foam::basicThermo::New(Foam::fvMesh const&) in
"/home/aa/OpenFOAM/OpenFOAM-1.5.x/lib/linux64GccDPOpt/libbasicThermophysicalMode ls.so"
#10 main at
~/OpenFOAM/aa-1.5.x/applications/yPlusRASCompMultiRegion/yPlusRASCompMultiRegion .C:152
#11 __libc_start_main in "/lib/libc.so.6"
#12 _start in
"/home/aa/OpenFOAM/aa-1.5.x/applications/bin/linux64GccDPOpt/yPlusRASCompMultiRe gion"

>From function genericFvPatchField::genericFvPatchField(const fvPatch&
p, const DimensionedField& iF)
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at
line 45.

FOAM aborting

Aborted

It seems to be a problem with the patch-type of the fluid-solid interface introduced by splitMeshRegions (is this a simple patch or wall ..??). I dug a bit in genericFvPatchField.C and basicThermo.C/.H but couldn t figure out yet what's wrong. Could anybody give me a suggestion please!!

Thx in advance!
Aram

mabinty March 10, 2009 10:11

Dear all!! I was searching
 
Dear all!!

I was searching a bit in the forum and found an entry explaining the error message I received (http://www.cfd-online.com/OpenFOAM_D...ges/1/593.html). So it seems that the solid-fluid interface air_to_ceiling is a default or generic patch field, and hence does not know how to evaluate itself, but what in turn would be necessary to calculated an enthalpy field h (by basicThermo). Isn t it? Unfortunately I haven t found a solution to this problem yet but keep on digging. Appreciate any comments!!

Thx in advance,
Aram

sebastiank July 17, 2009 04:40

Quote:

Originally Posted by mabinty (Post 184958)
Dear all!!

I adapted the yPLusRAS utility for a compressible case (yPLusRASCompressible) and it seems to work (at least I believe so ...). As I m currently working with a multi region solver (chtMultiRegionFoam) I need to adapt it further, so that yPlus is calculated/written only in the fluid region. I couldn t figure out yet how to realize that yPLusRASCompressible follows the structure of the time directories "timeName/fluidRegionName" (e.g. 51/topAir) to access the needed fields for the calculation of yPLaus in the fluidRegionName region. I would greatly appreciate any hint on that! Thx in advance,
Aram

Dear Mabinty,
I'am currently struggeling on adapting the yPlusRAS utility for a compressible case, in my case, rhoPorousSimpleFoam. How did you adapt yPlusRAS in order to get it to work with a compressible case ?

Regards,

Sebastian

mabinty July 19, 2009 08:32

Hi Sebastian!

You have to use a compressible RASModel:

# include "compressibleCreatePhi.H"
autoPtr<compressible::RASModel> RASModel
(
compressible::RASModel::New(rho, U, phi, thermo())
);

Study the code Bernhard posted in this thread some while ago (checkYplusCompressible).

All the best,
Aram

fgal June 1, 2010 06:55

Hi everybody,

I would like to compute Delta Y+ (first cell height scaled by intern zone scales) to know which boundary condition to set to k (zero gradient or uniform 0.0).
I am using a compressible LES solver, so I tried the yPlusLES utility but it needs nuSgs, so to be adapted for incompressible cases. How can I solve that problem ? Do I need to modify yPlusLES and divide muSgs by rho ?
thanks

Francois


All times are GMT -4. The time now is 16:52.