CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Usage of R and LRR (http://www.cfd-online.com/Forums/openfoam/86577-usage-r-lrr.html)

GGerber March 27, 2011 04:11

Usage of R and LRR
 
Hi Foamers,

I have a wall-jet simulation, which uses the kOmegaSST turbulence model. The model performs ok and I would now like to investigate the Reynolds stresses for this flow. Therefore I have modified my model to use the LLR turbulence model. The LRR simulation blows up when I run it from time 0.

From the forums I gather that I can use the R utility to derive the Reynolds stresses fields from the kOmegaSST results. This will set up the 'initial conditions' for the LRR model.

However, when I run the command "R" from the casedir the utility simply zip's the R file that I placed in the directory of the last time-step. I would have expected that the utility would modify the 'internalField' entry in the R-file, but it is left unchanged...

If someone can tell me how to properly use R and setup LRR it would be much appreciated. Below is my R file and controlDict file.

Thanks,
George

~~~~~~~~
FoamFile
{
version 2.0;
format ascii;
class volSymmTensorField;
object R;
}
// * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];
internalField uniform (0 0 0 0 0 0);
boundaryField
{
inlet {
type fixedValue;
value uniform (0.0015325 0 0 0.0015325 0 0.00306504); // (k/2 0 0 k/2 0 k);
}
walls
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}
bed
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}
top
{
type symmetryPlane;
}
outlet
{
type zeroGradient;
}
}
~~~~~~~~~~~~
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 2820;
deltaT 1;
writeControl timeStep;
writeInterval 20;//100;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression compressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
~~~~~~~~~~~~~`

GGerber March 29, 2011 02:47

Hi Foamers,

I have solved my problem.
Issue closed.

Best regards,
George

Sergio13 April 8, 2011 17:13

About R
 
Hi George
I am quite new with the CFD and OpenFoam, and I need to calculate the Reynolds Stresses, and if you can help me with the following questions, I would really appreciate it.

1. Is necessary to create a R file?
2. If so, should the location for this file be the system directory?
3. How will the output file be created? (I mean, is it required to run again the simulation?)

I would also appreciate if you can give me some instructions about the usage of R.

Thanks

GGerber April 10, 2011 16:09

Quote:

Originally Posted by Sergio13 (Post 302839)
Hi George
I am quite new with the CFD and OpenFoam, and I need to calculate the Reynolds Stresses, and if you can help me with the following questions, I would really appreciate it.

1. Is necessary to create a R file?
2. If so, should the location for this file be the system directory?
3. How will the output file be created? (I mean, is it required to run again the simulation?)

I would also appreciate if you can give me some instructions about the usage of R.

Thanks

Hi Sergio,
1) No, I dont think its necessary to create a R file. Just run 'R' from the command line after you finished a k-epsilon simulation. I think you also need to set the ControlDict keyword endTime (or lastTime?) to latestTime.
2) I have not investigated how the Reynolds stresses are computed from the k-epsilon results. You will probably see in the 'R' application code how it is computed. The Boussinesq hypothesis is probably used (using the effective viscosity and mean velocity gradients) to compute the individual Reynolds stresses.

HTH,
George

Sergio13 April 10, 2011 16:33

Hi George.
First than all, i want to thank you for take time to read my question, and answer it.

On the other hand I have realized that I am using a LES turbulence model, and thus my simulation is not steady state. This explain why after I typed R an error message, asking for the RASProperties.

Have you ever tried to calculate Reynolds stresses in such a simulation (LES)?

Thanks again for your help

GGerber April 12, 2011 02:39

Hi Sergio,

Sorry I do not have any experience with LES.

Good luck,
George

Sergio13 April 12, 2011 10:36

Thanks for your help!

mikeP May 7, 2012 10:49

Hi,

I have the same problem as George. I have a case solved with k-epsilon. When I run the utility R, it does not give any warnings or errors and completes successfully. Afterwards when I check the field R, it remains unchanged.
It seems that George has found the answer to it, but how is it?

s.m October 16, 2013 03:36

Quote:

Originally Posted by GGerber (Post 301317)
Hi Foamers,

I have solved my problem.
Issue closed.

Best regards,
George

Hi GGerber,
What did you do to solve your promblem, could you please tell me, i really need some guidance to solve my problem,:o
thank you very much:)
i simulate the flow over an airfoil, using the simpleFoam solver, my solution be complete with kOmegaSST, but it become diverged when i change the kOmegaSST to LRR, i don't know what should i do.
This is the divergence error:
Time = 14

smoothSolver: Solving for Ux, Initial residual = 0.348073, Final residual = 6.66759e-10, No Iterations 69
smoothSolver: Solving for Uy, Initial residual = 0.520936, Final residual = 9.19728e-10, No Iterations 68
GAMG: Solving for p, Initial residual = 1, Final residual = 0.256866, No Iterations 100
GAMG: Solving for p, Initial residual = 1, Final residual = 8.38804e-11, No Iterations 25
time step continuity errors : sum local = 5.57903e+32, global = -3.39894e+28, cumulative = -3.39894e+28
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib64/libc.so.6"
#3 Foam::GaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:?
#4 Foam::GaussSeidelSmoother::smooth(Foam::Field<doub le>&, Foam::Field<double> const&, unsigned char, int) const at ??:?
#5 Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8 Foam::fvMatrix<double>::solve() at ??:?
#9 Foam::SolverPerformance<double> Foam::solve<double>(Foam::tmp<Foam::fvMatrix<doubl e> > const&) at ??:?
#10 Foam::incompressible::RASModels::LRR::correct() at ??:?
#11
at ??:?
#12 __libc_start_main in "/lib64/libc.so.6"
#13
at /home/abuild/rpmbuild/BUILD/glibc-2.17/csu/../sysdeps/x86_64/start.S:126
Floating point exception


All times are GMT -4. The time now is 21:28.