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/)
-   -   monitor y+ (https://www.cfd-online.com/Forums/openfoam-solving/76613-monitor-y.html)

vaina74 May 31, 2010 05:48

monitor y+
 
I use simpleFoam and I use yPlusRAS to check the quality of the simulation.I'd like to know how to monitor y+ while running. In the forum I find only threads about y+ post-processing. Can anyone help me, please?

mturcios777 June 1, 2010 13:37

I was just looking around for this, so check this thread out. The direction you want to take is:

1) Add the initial creation of the yPlus field to createFields.H
2) Add the calculation of yPlus somewhere in the solver code (I think the thread suggested at the end of the PISO loop, which makes sense to me)

Code for both tasks can be easily lifted from the original yPlusRAS.C source.

While I'm here, I'll ask anyone else who is reading what modifications need to be made for using the utility with compressible flows. My post is in the thread I linked to above, so please reply there.

vaina74 June 3, 2010 08:28

Does it mean I have to edit simpleFoam code and re-compile it? I don't want to play with solver codes, I'm not such an 'expert' and I'm afraid of making something wrong. I hope there is a simpler way, such as dictionary editing or utilities like yPlusRAS :(

mturcios777 June 3, 2010 12:57

Not that bad actually
 
I thought it would be bad at first to do things like this as well, but after some practice it isn't that bad. Especially since yPlus is just a part of the turbulence model classes anyhow. A great tutorial for information on how to modify solvers can be found on the OFWiki here.

If you are unfamiliar with C/C++ and object oriented programming, a great place to get up to speed is CPlusPlus.com

Your situation is slightly different, as you only need to output a quantity that already exists somewhere in the solver already. Have a look at $FOAM_APP/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C to see that the actual output of y+ doesn't take too many lines.

And for anyone else reading this, I'm looking to modify yPlusRAS to work with compressible flow. I'm thinking I just need to change the creation of the turbulence model to what we see in the createFields.H file of reactingFoam. Sound reasonable?

sandy June 3, 2010 20:22

Yes, I am finding the tutorial about it.

vaina74 June 4, 2010 02:54

Thank you for your suggestions, Marco. I hope someone else has a no-programming solution for me. In the meantime I'll study this stuff.

vaina74 March 14, 2011 04:58

Some time ago, I asked for a method to monitor y+ while the computation is running. I was answered to include some yPlusRAS code in the solver file. I'm not a programmer or a C++ expert and I'm afraid to get in trouble, so I dropped.
Now I ask for that again, I really need it. I work with 36 hours computations on a cluster and the person in charge for it and coworkers could kill me if I try to mess around with OF and solvers. Maybe in the meantime someone has implemented a function to obtain y+ on the fly. Anyway, I can't understand why nobody made it before. I think it would be very useful to avoid very time consumption simulations and find out a bed y+ only at end of running. Maybe the matter is not clear to me and I could estimate a good y+ value before launching the solver, but I'm involved with marine propellers and I think the grid spacing calculators are not appropriate to me. Can someone help me or explain why I'm wrong? Maybe I miss something important about the question. I'll be gratefull for your corrections.

Eren10 May 30, 2011 11:32

just using : yPlusRAS calculates the yPlus values. But I don't know how it is calculated. Can i trust the values coming from yPlusRAS ? For some case I had value above 3000 :confused:


i see that your question was different, sorry.

And if the yplus value is oke in the begin (0 file) than it should remain oke , isn't it ?

sandy May 31, 2011 21:39

No, it will vary with the different friction velocity, namely wall viscosity-stress.


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