
[Sponsors] 
December 1, 2006, 05:43 
Hi Foamers,
I have question

#1 
Senior Member

Hi Foamers,
I have question about running rasInterFoam with the SA model. If I set up the files using FoamX or by copying the damBreak tutorial, I get an error stating that the file "nut" is missing from the 0 directory > FOAM FATAL IO ERROR : cannot open file file: /scratch/egp11/SPNACA2/0/nut at line 0. If I copy 0/nuTilda to 0/nut, rasInterFoam runs, but the eddy viscosity remains zero, e.g., BICCG: Solving for nuTilda, Initial residual = 0, Final residual = 0, No Iterations 0 bounding nuTilda, min: 0 max: 0 average: 0 So what am I missing? I've searched the documentation and the discussion site and was unable to find an answer. I'd appreciate any advice, Eric Paterson 

December 2, 2006, 14:16 
No one has run the SA model?

#2 
Senior Member

No one has run the SA model? I figured that I was doing something dumb, and that an answer would be easy.
Help me out, I'm still struggling through Barton and Nackman, and Karniadakis and Kirby (books on C++ for scientific and engineering computing) and am not yet able to understand all the details of how OF works, but am trying to learn by doing. Eric 

December 2, 2006, 15:44 
I don't know if this is an exe

#3 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,768
Rep Power: 21 
I don't know if this is an exercise in selfflagelation or you're just trying to be talkative, but anyway: Dr. Paterson, what is your initial value of nut, which is the solution variable for the SpalartAllmaras model? Is it zero? How did you expect the model to produce turbulence from initial zero nut?
See it now? Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

December 2, 2006, 19:04 
Hrv,
No, I'm not selfflage

#4 
Senior Member

Hrv,
No, I'm not selfflagellating or being more talkative than normal. Yes, my initial condition is zero, and I expect the model (as with any RANS turbulence model) to produce turbulence through the production term. For the SA model, the production term is a function of the vorticity magnitude, which will be generated by the noslip condition, and in turn produce nuTilda and nut. If OF requires nonzero nuTilda in the freestream, then this answers my question. For problems that have practically zero free stream turbulence (e.g., modeling a ship in a towing tank), what would be the recommended initial condition? Eric 

December 3, 2006, 05:37 
Well, have a look at the gener

#5 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,768
Rep Power: 21 
Well, have a look at the generation term in RANS model by model.
GibsonLaunder RSTM, as the most general form: volTensorField P = (R_ & fvc::grad(U_)); Thus, for no Reynolds stress, you get no production. kepsilon: volScalarField G = nut_*2*magSqr(symm(fvc::grad(U_))); nut_ = Cmu*sqr(k_)/(epsilon_ + epsilonSmall_); So, for zero k you get zero nut_ and zero generation. SpalartAllmaras: Cb1*Stilda*nuTilda_ This is multiplied by nuTilda, right? So for nuTilda = 0 you get no generation. It is the same for all models. Can you tell me which term in the SpalartAllmaras model will produce turbulence if the original state is zero? I think you have already shown that nuTilda = 0 satisfies the transport equation, which rather proves my point. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

December 3, 2006, 07:00 
Hrv,
Mea culpa, you are rig

#6 
Senior Member

Hrv,
Mea culpa, you are right. Complete brain lock on my part. I had forgotten that the production term (of SA and most other RANS models) has nuTilda in it. That's what happens when you get old, when you try to do 10 things at once, and when you spend too much time as a research manager instead of research performer. By the way, I went back and looked at the last work I had done using the SA model. There I set freestream nuTilda to 0.5*nu. I've now done the same with OF and all appears well. Thanks for the gentle reminder, and for the patience. Eric 

April 20, 2007, 07:16 
Hi everybody,
since OpenFOAM

#7 
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 8 
Hi everybody,
since OpenFOAM1.3 there is a factor fv3 introduced into the SpalartAllmaras model. It is used for scaling Stilda. I can´t find any literature about it. Can anyone tell me what this factor is about and where something is published about it? Rolando 

April 23, 2007, 02:49 
Hi Rolando,
I read something

#8 
Senior Member
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 179
Rep Power: 8 
Hi Rolando,
I read something about SA model and DES(SA + LES): "Multiscale and Multiresolution Approaches in Turbulence" P. Sagaut, S. Deck, M. Terracol Imperial College Press. it is written that with the initial formulation was optimise (by new fv2, and fv3) to avoid a disturb of r (when Stilda become negative) you can read also a comparaison between the two models in Deck and al. 2002 Aerospace Science and Technology Vol 6, No 3 171183 

April 23, 2007, 03:02 
Hi Cedric,
thank you very muc

#9 
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 8 
Hi Cedric,
thank you very much for that information. Rolando 

November 28, 2007, 02:58 
Has anyone ran rhoSimpleFoam w

#10 
Member
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8 
Has anyone ran rhoSimpleFoam with SA? After checking all my dimensions, I'm still having the following error:
Selecting turbulence model SpalartAllmaras Starting time loop Time = 1 > FOAM FATAL ERROR : incompatible dimensions for operation [U[0 1 2 0 0 0 0] ] + [U[1 2 2 0 0 0 0] ] This seems to indicate that a density term is missing. Dimensions of my Time 0 files: mut [1 1 1 0 0 0 0] nuTilda [0 2 1 0 0 0 0] p [1 1 2 0 0 0 0] T [0 0 0 1 0 0 0] U [0 1 1 0 0 0 0] fvSolution includes: SIMPLE { nNonOrthogonalCorrectors 0; pMin pMin [1 1 2 0 0 0 0] 100; } SA model in turbulenceProperties is copied from incompressible simpleFoam tutorial, adding: alphah alphah [0 0 0 0 0 0 0] 0.7; thermoPhysicalProperties includes: hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>; mixture air 1 28.9 1007 0 1.84e05 0.7; Also tried rhoTurbFoam which generated the following error: > FOAM FATAL ERROR : LHS and RHS of + have different dimensions dimensions : [1 1 3 0 0 0 0] + [0 2 3 0 0 0 0] This also seems to indicate that a density term is missing. Thanks in advance, Doug 

November 28, 2007, 04:13 
nuTildaEqn dimensions in the C

#11 
Member
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8 
nuTildaEqn dimensions in the Compressible SA Ccode appear to be inconsistent.
For the Compressible SA... tmp<fvscalarmatrix> nuTildaEqn ( fvm::ddt(rho_, nuTilda_) + fvm::div(phi_, nuTilda_) ... But for the Incompressible SA... tmp<fvscalarmatrix> nuTildaEqn ( fvm::ddt(nuTilda_) + fvm::div(phi_, nuTilda_) ... I guess this may be causing the dimensions error of my previous post. Several terms in the compressible nuTildaEqn include rho, while others don't. This seems like a bug to me, but I don't know the correct compressible SA equation to fix it. Can someone with more experience confirm this observation? Offer a fix? Thanks, Doug 

December 1, 2007, 13:36 
The answer was to delete phi f

#12 
Member
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8 
The answer was to delete phi from prior incompressible run. Compressible phi includes density, whereas incompressible phi does not.


February 7, 2008, 00:26 
Doug could you please provide

#13 
Member
Shaun Darmody
Join Date: Mar 2009
Posts: 36
Rep Power: 8 
Doug could you please provide any information on the specific purpose of the pMin variable that is set in the fvSolution file of rhoSimpleFoam?
I am struggling to get a converged solution in rhoSimpleFoam and initially was getting 'bounding p' statements per iteration. I decreased significantly the pMin value and dropped my under relax factor on p to 0.001 as well as trying to run laminar for a 100 iterations. This seemed to remove the 'bounding p' statement after a few iterations. The laminar model aslo blew up after about 104 iterations. But I am baffled by pMin importance and how to get my solution to converge with some sort of turbulence included as well as decent underrelax factors that will not restrict the changing of the field variables too much. Any comments on your experience with pMin and rhoSimpleFoam would be great. I have posted my setup and explained the problem in a recent post to which i have had no reply yet. See the post "'bounding p' error using rhoSimpleFoam", if you like. Thanks for your time. Regards Shaun.D 

February 7, 2008, 03:54 
Shaun,
I found rhoSimpleFoa

#14 
Member
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8 
Shaun,
I found rhoSimpleFoam to be very sensitive to all of the relaxation factors. As I recall, I added rho to the list of relaxation factors, and I initially set p at 0.001 or maybe 0.0001 and the others in the range of 0.01. It took several hours of babysitting the code and gradually incresing the relaxation factors after every 50 to 100 cycles. If any one factor is increased too quickly, the result became unstable and I'd restart at a prior checkpoint. I also used paraFoam to see the results, with the values of p and v being the best indicators of convergence or lack thereof. magU was also useful as an indicator of convergence. My analysis was at about Mach 0.3, and I've read elsewhere in the forum that this solver works best for subsonic flow. Good luck. Doug 

February 7, 2008, 06:13 
G'day Doug, thanks for the rep

#15 
Member
Shaun Darmody
Join Date: Mar 2009
Posts: 36
Rep Power: 8 
G'day Doug, thanks for the reply.
Your comments make sense with what I have experienced thus far. I.e. the solver is very temperamental. Have you continued using rhoSimpleFoam since for any other cases perhaps? With pMin, do understand its function at all? Cheers and thanks for the quick response. Shaun.D 

February 7, 2008, 09:41 
Shaun,
I needed rhoSimpleFo

#16 
Member
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 8 
Shaun,
I needed rhoSimpleFoam for one particular task, completed the work, and have moved on. In the future I would use rhoSimpleFoam again should I need to perform a similar analysis. I never researched the definition or utility of, nor did I adjust pMin. I simply copied pMin from one of the tutorials. Doug 

February 7, 2008, 13:24 
Hi Shaun&Doug!
During the f

#17 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40 
Hi Shaun&Doug!
During the first iterations of the solution process it might happen that the pressure drops below reasonable values (sometimes even belw 0!). In older versions of rhoSimpleFoam the solver aborted if the pressure fell between 0 and the user had to specify a lower underrelaxation for p. In newer versions of rhoSimpleFoam, if the pressure falls below pMin it is set to pMin and the solver resumes. 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 

February 7, 2008, 17:11 
Thank you Bernhard for your co

#18 
Member
Shaun Darmody
Join Date: Mar 2009
Posts: 36
Rep Power: 8 
Thank you Bernhard for your comments and the swiftness of your response.
Regards Shaun.D 

May 9, 2008, 19:21 
Hello everyone,
I`m trying to

#19 
New Member
Daniele Bonetti
Join Date: Mar 2009
Posts: 3
Rep Power: 8 
Hello everyone,
I`m trying to use rhoSimpleFoam to solve the flow around a RAE2922 airfoil but, with any tyurbulence model or even if the turbulence model is switch off, I obtain a dimension error between LHS and RHS. I read the previous posts but I`m not able to fix my mistake. Could anyone give me a hint to proceed? Thanks a lot Daniele Exec : rhoSimpleFoam . rae2822a Date : May 09 2008 Time : 18:14:17 Host : aquila.recherche.polymtl.ca PID : 25970 Root : /home/dabon/OpenFOAM/dabon1.4/run/tutorials/rhoSimpleFoam Case : rae2822a Nprocs : 1 Create time Create mesh for time = 0 Reading thermophysical properties Selecting thermodynamics package hThermo<puremixture<sutherlandtransport<speciether mo<hconstthermo<perfectgas>>>> > Reading field U Reading/calculating face flux field phi Creating turbulence model Selecting turbulence model LaunderGibsonRSTM Starting time loop Time = 1 > FOAM FATAL ERROR : LHS and RHS of + have different dimensions dimensions : [0 2 1 0 0 0 0] + [1 1 1 0 0 0 0] #0 Foam::error::printStack(Foam:stream&) #1 Foam::error::abort() #2 Foam::operator+(Foam::dimensionSet const&, Foam::dimensionSet const&) #3 Foam::tmp<foam::geometricfield<foam::typeofsum<dou ble,>::type, Foam::fvPatchField, Foam::volMesh> > Foam::operator+<double,>(Foam::tmp<foam::geometric field<double,> > const&, Foam::GeometricField<double,> const&) #4 Foam::compressible::turbulenceModel::muEff() const #5 Foam::compressible::turbulenceModels::LaunderGibso nRSTM::divRhoR(Foam::Geometric Field<foam::vector<double>, Foam::fvPatchField, Foam::volMesh>&) const #6 main #7 __libc_start_main #8 __gxx_personality_v0 From function operator+(const dimensionSet& ds1, const dimensionSet& ds2) in file dimensionSet/dimensionSet.C at line 379. 

May 10, 2008, 03:19 
Hi Daniele
Have you modifie

#20 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,641
Rep Power: 25 
Hi Daniele
Have you modified your solver? Because the error strongly suggests that you are missing rho in the nominator on the LHS or rho in the denominator on the RHS. Best regards, Niels
__________________
Please note that I do not use the Friendfeature, so do not be offended, if I do not accept a request. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
SimpleFoam case with SpalartAllmaras turbulence model implemented  nedved  OpenFOAM Running, Solving & CFD  2  November 30, 2014 23:43 
Bug in SpalartAllmaras  seb62  OpenFOAM Bugs  39  May 30, 2012 14:25 
SpalartAllmaras DES question  ivan_cozza  OpenFOAM Running, Solving & CFD  0  December 15, 2008 07:34 
YPlus for SpalartAllmaras  ddigrask  OpenFOAM Running, Solving & CFD  1  December 12, 2008 15:29 
Pow in lib64tlslibmso6 SigFpe when running coodles with SpalartAllmaras  lillberg  OpenFOAM Bugs  4  December 7, 2007 09:17 