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

SpalartAllmaras question

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 2006, 04:43
Default Hi Foamers, I have question
  #1
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 18
egp is on a distinguished road
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
egp is offline   Reply With Quote

Old   December 2, 2006, 13:16
Default No one has run the SA model?
  #2
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 18
egp is on a distinguished road
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
egp is offline   Reply With Quote

Old   December 2, 2006, 14:44
Default I don't know if this is an exe
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
I don't know if this is an exercise in self-flagelation 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 Spalart-Allmaras 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
hjasak is offline   Reply With Quote

Old   December 2, 2006, 18:04
Default Hrv, No, I'm not self-flage
  #4
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 18
egp is on a distinguished road
Hrv,

No, I'm not self-flagellating 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 no-slip condition, and in turn produce nuTilda and nut.

If OF requires nonzero nuTilda in the free-stream, 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
egp is offline   Reply With Quote

Old   December 3, 2006, 04:37
Default Well, have a look at the gener
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Well, have a look at the generation term in RANS model by model.

Gibson-Launder RSTM, as the most general form:

volTensorField P = -(R_ & fvc::grad(U_));

Thus, for no Reynolds stress, you get no production.

k-epsilon:

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.

Spalart-Allmaras:

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 Spalart-Allmaras 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
hjasak is offline   Reply With Quote

Old   December 3, 2006, 06:00
Default Hrv, Mea culpa, you are rig
  #6
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 18
egp is on a distinguished road
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 free-stream 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
vbnhfylbh likes this.
egp is offline   Reply With Quote

Old   April 20, 2007, 07:16
Default Hi everybody, since OpenFOAM-
  #7
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Hi everybody,
since OpenFOAM-1.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
rolando is offline   Reply With Quote

Old   April 23, 2007, 02:49
Default Hi Rolando, I read something
  #8
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
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 171-183
cedric_duprat is offline   Reply With Quote

Old   April 23, 2007, 03:02
Default Hi Cedric, thank you very muc
  #9
Member
 
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17
rolando is on a distinguished road
Hi Cedric,
thank you very much for that information.

Rolando
rolando is offline   Reply With Quote

Old   November 28, 2007, 01:58
Default Has anyone ran rhoSimpleFoam w
  #10
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 17
gdbaldw is on a distinguished road
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.84e-05 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
gdbaldw is offline   Reply With Quote

Old   November 28, 2007, 03:13
Default nuTildaEqn dimensions in the C
  #11
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 17
gdbaldw is on a distinguished road
nuTildaEqn dimensions in the Compressible SA C-code 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
gdbaldw is offline   Reply With Quote

Old   December 1, 2007, 12:36
Default The answer was to delete phi f
  #12
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 17
gdbaldw is on a distinguished road
The answer was to delete phi from prior incompressible run. Compressible phi includes density, whereas incompressible phi does not.
gdbaldw is offline   Reply With Quote

Old   February 6, 2008, 23:26
Default Doug could you please provide
  #13
Member
 
Shaun Darmody
Join Date: Mar 2009
Posts: 36
Rep Power: 17
shaun is on a distinguished road
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 under-relax 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
shaun is offline   Reply With Quote

Old   February 7, 2008, 02:54
Default Shaun, I found rhoSimpleFoa
  #14
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 17
gdbaldw is on a distinguished road
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
gdbaldw is offline   Reply With Quote

Old   February 7, 2008, 05:13
Default G'day Doug, thanks for the rep
  #15
Member
 
Shaun Darmody
Join Date: Mar 2009
Posts: 36
Rep Power: 17
shaun is on a distinguished road
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
shaun is offline   Reply With Quote

Old   February 7, 2008, 08:41
Default Shaun, I needed rhoSimpleFo
  #16
Member
 
Doug Baldwin
Join Date: Mar 2009
Posts: 53
Rep Power: 17
gdbaldw is on a distinguished road
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
gdbaldw is offline   Reply With Quote

Old   February 7, 2008, 12:24
Default Hi Shaun&Doug! During the f
  #17
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 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 under-relaxation 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
gschaider is offline   Reply With Quote

Old   February 7, 2008, 16:11
Default Thank you Bernhard for your co
  #18
Member
 
Shaun Darmody
Join Date: Mar 2009
Posts: 36
Rep Power: 17
shaun is on a distinguished road
Thank you Bernhard for your comments and the swiftness of your response.

Regards

Shaun.D
shaun is offline   Reply With Quote

Old   May 9, 2008, 19:21
Default Hello everyone, I`m trying to
  #19
New Member
 
Daniele Bonetti
Join Date: Mar 2009
Posts: 3
Rep Power: 17
dabon is on a distinguished road
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/dabon-1.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.
dabon is offline   Reply With Quote

Old   May 10, 2008, 03:19
Default Hi Daniele Have you modifie
  #20
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
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 Friend-feature, so do not be offended, if I do not accept a request.
ngj 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
SimpleFoam case with SpalartAllmaras turbulence model implemented nedved OpenFOAM Running, Solving & CFD 2 November 30, 2014 22: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 06:34
YPlus for SpalartAllmaras ddigrask OpenFOAM Running, Solving & CFD 1 December 12, 2008 14:29
Pow in lib64tlslibmso6 SigFpe when running coodles with SpalartAllmaras lillberg OpenFOAM Bugs 4 December 7, 2007 08:17


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