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

Writing y

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2007, 07:03
Default How do I write y+ (so that I c
  #1
Member
 
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 17
christian is on a distinguished road
How do I write y+ (so that I can plot y+ in paraFoam) when not running LES?

Best regards,
Christian Svensson
christian is offline   Reply With Quote

Old   May 15, 2007, 03:29
Default Have a look at the checkYPlus
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Have a look at the checkYPlus postprocessing utility.
mattijs is offline   Reply With Quote

Old   May 15, 2007, 03:40
Default This is what I've done. From w
  #3
Member
 
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 17
christian is on a distinguished road
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
christian is offline   Reply With Quote

Old   May 15, 2007, 04:07
Default Two possibilities (first is be
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
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)

checkYPlusIncompressible.tgz
checkYPlusCompressible.tgz
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 23, 2007, 07:08
Default When using the yPlusLES utilit
  #5
Member
 
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 17
christian is on a distinguished road
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
christian is offline   Reply With Quote

Old   August 23, 2007, 07:37
Default Hi christian, I am new to o
  #6
Member
 
hadi tartoussi
Join Date: Mar 2009
Location: paris
Posts: 48
Rep Power: 17
hadi is on a distinguished road
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
hadi is offline   Reply With Quote

Old   August 23, 2007, 07:41
Default No I haven't modified the yPlu
  #7
Member
 
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 17
christian is on a distinguished road
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.
christian is offline   Reply With Quote

Old   August 23, 2007, 08:03
Default Your yPlus value is uniform ov
  #8
Member
 
hadi tartoussi
Join Date: Mar 2009
Location: paris
Posts: 48
Rep Power: 17
hadi is on a distinguished road
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
hadi is offline   Reply With Quote

Old   August 23, 2007, 08:20
Default wallGradU gives me a lot of ve
  #9
Member
 
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 17
christian is on a distinguished road
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 is offline   Reply With Quote

Old   August 23, 2007, 08:33
Default I realised what was wrong. In
  #10
Member
 
Christian Lindbäck
Join Date: Mar 2009
Posts: 55
Rep Power: 17
christian is on a distinguished road
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
christian is offline   Reply With Quote

Old   September 27, 2007, 21:47
Default I'm using rasInterFoam solver
  #11
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
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 is offline   Reply With Quote

Old   September 27, 2007, 21:54
Default Actually, there is some proble
  #12
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
Actually, there is some problem reading 'p' field too. Hmm... So any input is greatly welcomed.

Thanks,
Krystian
paka is offline   Reply With Quote

Old   September 28, 2007, 03:58
Default Hello Krystian, Which utili
  #13
Member
 
hadi tartoussi
Join Date: Mar 2009
Location: paris
Posts: 48
Rep Power: 17
hadi is on a distinguished road
Hello Krystian,

Which utility did you use to calculate y+?

hadi
hadi is offline   Reply With Quote

Old   September 28, 2007, 05:11
Default I tried to use checkYPlus, how
  #14
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
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.
paka is offline   Reply With Quote

Old   September 28, 2007, 06:02
Default If you want to calculate y+. y
  #15
Member
 
hadi tartoussi
Join Date: Mar 2009
Location: paris
Posts: 48
Rep Power: 17
hadi is on a distinguished road
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
hadi is offline   Reply With Quote

Old   September 28, 2007, 16:32
Default Yes, I figured that out that c
  #16
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
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
paka is offline   Reply With Quote

Old   October 14, 2007, 11:16
Default Hello! I'm trying to compile
  #17
Member
 
Michele Vascellari
Join Date: Mar 2009
Posts: 70
Rep Power: 17
mighelone is on a distinguished road
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
mighelone is offline   Reply With Quote

Old   October 15, 2007, 04:13
Default Well. That removes the calcula
  #18
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 15, 2007, 06:08
Default thank you Bernhard! I don't
  #19
Member
 
Michele Vascellari
Join Date: Mar 2009
Posts: 70
Rep Power: 17
mighelone is on a distinguished road
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
mighelone is offline   Reply With Quote

Old   October 15, 2007, 14:50
Default Hi Michele! The 1.4.1-ready
  #20
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider 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
New with writing UDF/Need help pls mac FLUENT 6 June 14, 2007 06:11
New to writing UDF Sandilya FLUENT 0 May 31, 2007 12:03
UFD writing help Nelly FLUENT 1 January 19, 2007 11:29
Writing geometry Dadou Siemens 0 March 15, 2004 11:34
error while writing bc Theju FLUENT 3 March 8, 2002 13:20


All times are GMT -4. The time now is 19:15.