CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Bug in SpalartAllmaras

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2009, 11:23
Default Hi Sébastien, Thanks for te
  #21
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Hi Sébastien,

Thanks for testing the two variants. For general use we will keep the version with fv3 but if there is interest we could add a switch to allow users to run the standard form or we could derive the version with fv3 from the standard form so that either would be run-time selectable.

Do you have an interest in any of the other SA variants?

H
henry is offline   Reply With Quote

Old   January 28, 2009, 12:39
Default Thanks a lot Henry for the inf
  #22
Member
 
Paulo Alexandre Costa Rocha
Join Date: Mar 2009
Posts: 71
Rep Power: 17
paulo is on a distinguished road
Thanks a lot Henry for the info,

This means that I can switch wall functions on / off only changing the boundary type ?

Thanks again,

Best regards,

Paulo Rocha
paulo is offline   Reply With Quote

Old   January 28, 2009, 14:10
Default With SpalartAllmaras yes wall-
  #23
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
With SpalartAllmaras yes wall-functions are selected as boundary conditions on nut. The other low-Re models do not use wall-functions, optionally or otherwise.

H
henry is offline   Reply With Quote

Old   January 28, 2009, 16:05
Default Thank you very much Henry.
  #24
Member
 
Paulo Alexandre Costa Rocha
Join Date: Mar 2009
Posts: 71
Rep Power: 17
paulo is on a distinguished road
Thank you very much Henry.

Paulo Rocha.
paulo is offline   Reply With Quote

Old   January 28, 2009, 16:09
Default Thank you very much Henry.
  #25
Member
 
Paulo Alexandre Costa Rocha
Join Date: Mar 2009
Posts: 71
Rep Power: 17
paulo is on a distinguished road
Thank you very much Henry.

Paulo Rocha.
paulo is offline   Reply With Quote

Old   January 28, 2009, 23:00
Default Here is a comparison of 3 case
  #26
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
Here is a comparison of 3 cases for a flat plate at Re = 1e6 with sublayer resolution.

Case 1: fv3 != 1, fv2=1.0 - chi/(1.0 + chi*fv1), incorrect, but current distro.
Case 2: fv3 = 1, fv2=1.0 - chi/(1.0 + chi*fv1), baseline SA
Case 3: fv3 != 1, fv2=1.0/pow3(scalar(1) + chi/Cv2_), NASA LaRC fv3 formulation

I would vote for baseline SA as standard implementation in OF. If you read http://turbmodels.larc.nasa.gov/spalart.html, you will see that the fv3 model is not recommended.





egp is offline   Reply With Quote

Old   January 28, 2009, 23:11
Default http://www.cfd-online.com/Open
  #27
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


egp is offline   Reply With Quote

Old   January 29, 2009, 04:03
Default Hi Henry, I should say that
  #28
New Member
 
Sébastien Bocquet
Join Date: Mar 2009
Posts: 21
Rep Power: 17
seb62 is on a distinguished road
Hi Henry,

I should say that I am working in industry
and for the moment we are testing openFOAM
on various flows. So we haven't yet studied in details which SA we would like to have, but
talking briefly with some collegues, the SA
with Edwards correction and rotation/curvature correction seem interesting.

Seb
seb62 is offline   Reply With Quote

Old   January 29, 2009, 04:07
Default Hi Henry, I should say that
  #29
New Member
 
Sébastien Bocquet
Join Date: Mar 2009
Posts: 21
Rep Power: 17
seb62 is on a distinguished road
Hi Henry,

I should say that I am working in industry
and for the moment we are testing openFOAM
on various flows. So we haven't yet studied in details which SA we would like to have, but
talking briefly with some collegues, the SA
with Edwards correction and rotation/curvature correction seem interesting.

Seb
seb62 is offline   Reply With Quote

Old   January 29, 2009, 04:20
Default Hi Eric, Thanks for the com
  #30
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Hi Eric,

Thanks for the comparison, it confirms what we suspected that with the correct fv2 the fv3 term behaves satisfactorally.

> I would vote for baseline SA as standard implementation in OF. If you read
> http://turbmodels.larc.nasa.gov/spalart.html, you will see that the fv3 model is not recommended.

Not recommended but necessary for stability for complex flows as I have explained in this thread. What I would like to know is what is the "recommended" variant which solved the problem of negative generation?

Hi Sébastien,

I also think that the Edwards variant is interesting. It seems more natural to me that the turbulence production should be based on shear rather than rotation. Perhaps we should give this one a go.

H
henry is offline   Reply With Quote

Old   February 11, 2010, 12:30
Default
  #31
New Member
 
wei wu
Join Date: Mar 2009
Location: us
Posts: 14
Rep Power: 17
wei_wu is on a distinguished road
Hello, Mr Weller
I'm using the Spalart-Allmaras model with roughness wall functions to calculate the wall roughness problem. Do you know what roughness wall functions are they using and what is the source paper?

Thanks

Wei



Quote:
Originally Posted by henry View Post
Not true, there are several low-Re turbulence models included in OpenFOAM:

LamBremhorstKE
LaunderSharmaKE
LienCubicKELowRe
LienLeschzinerLowRe
SpalartAllmaras

all of which will run without wall-functions. With SpalartAllmaras wall-functions are optional and should be used where the mesh is not fine enough to resolve the boundary-layer.

H
wei_wu is offline   Reply With Quote

Old   February 16, 2010, 17:47
Default
  #32
New Member
 
Charles Mockett
Join Date: Dec 2009
Location: Berlin, Germany
Posts: 9
Rep Power: 16
charlie is on a distinguished road
Quote:
Originally Posted by henry View Post
Hi Sébastien,

Thanks for the interesting link, it seems they are not very happy with the fv3 term: " It was devised to prevent negative values of the source term, and is not recommended because of unusual transition behavior at low Reynolds numbers (see Spalart, P. R., AIAA 2000-2306, 2000)." but the source term going negative does happen in complex flow cases and causes nuTilda to go negative! so we need a fix of some kind. It is not clear if any of the alternative formulations are preferable, perhaps the SA-Edwards or SA-salsa are better; at least they both have a well-posed generation term.

H
Dear Dr. Weller, dear all,

Thanks for this interesting and important discussion. I brushed with this issue recently, when implementing the original SA formulation in our in-house solver: I found the same stability problem in very specific regions of the flow in a "slightly complex" test case. I contacted the model authors and they recommended some additional limiters to prevent Stilde from reaching zero or going negative, which fixes this problem. The limiter we implemented is:

chi >= 1E-03
sTilde >= 1E-05*U_ref/L_ref

(we have a user-defined reference length and velocity, however it is simply important to make sure sTilde doesn't reach zero).

After that discussion, the LaRC web page you have cited was updated with a one-line note at the end of the original SA model description.

I wouldn't recommend the SA-Edwards model, as contrary to the authors' intention, it doesn't give the same results as the original model (rather, significantly reduced skin friction).

My hope is that by implementing the original SA with these limiters, you will be able to keep the model to a single, all-purpose variant that corresponds to the "industry standard".

Best regards,

Charlie.
charlie is offline   Reply With Quote

Old   February 17, 2010, 05:55
Default
  #33
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
I am not a big fan of clipping; I would prefer an approach where the formulation of the terms naturally obey the physical constraints. Do you have results that show that the original formulation with the clipping is better than the "Ashford" correction we currently use and distribute with OpenFOAM?

H
henry is offline   Reply With Quote

Old   February 17, 2010, 12:37
Default
  #34
New Member
 
Charles Mockett
Join Date: Dec 2009
Location: Berlin, Germany
Posts: 9
Rep Power: 16
charlie is on a distinguished road
Dear Henry,

I understand and share your concern - these things are certainly "not nice". However, in this case I was happy with the modification, for the following reasons:
  • It does not give rise to discontinuities in the converged solution (i.e. sTilde remains above zero everywhere), rather simply prevents a stable but spurious branch in the system of model equations.
  • It is "sanctioned" by the model authors and standard in the implementation of the original S-A model in many solvers, including the NASA solvers.

Now to your question:
Do you have results that show that the original formulation with the clipping is better than the "Ashford" correction we currently use and distribute with OpenFOAM?

I'm not familiar with the "Ashford" correction and didn't manage to find the PhD thesis easily, but assume this refers to the f_v3 modification. The f_v3 was by the way proposed by Spalart as an attempt to fix the problem of negative sTilde without clipping. I don't have results to show that the original+clipping is better than f_v3, since I haven't tried f_v3. All I have are citations that discourage the use of f_v3, for example Spalart writes in "Trends in Turbulence Treatments" (AIAA 2000-2306):

"...the f_v3 function, which we have recommended privately to some users. The f_v3 formula has an odd effect on transition at low Reynolds numbers, which we never fully understood. It was devised to prevent negative values of sTilde. We now recommend, instead, taking for sTilde the larger of the original f_v1 definition and 0.3 x S."

So, in summary, I just have "hearsay" and no concrete results of my own to say that one is better than the other. However, reputable and authoritative sources discourage the use of the unpublished f_v3. I would therefore personally be happier to see the original model with clipping as the standard OpenFOAM implementation. However, due to the source code acces it would of course be no problem for me to implement my preferred version should you decide to go for f_v3!

I hope this information is useful.

Best regards,

Charlie.
charlie is offline   Reply With Quote

Old   November 6, 2010, 18:47
Default
  #35
Member
 
Kim Yusik
Join Date: Dec 2009
Posts: 39
Rep Power: 16
impecca is on a distinguished road
Hi, I am following up LES version of Spalart-allmaras and have some questions.

Why fv3 is (which is from V1.7) ?

00067 tmp<volScalarField> SpalartAllmaras::fv3() const
00068 {
00069 volScalarField chi = nuTilda_/nu();
00070 volScalarField chiByCv2 = (1/Cv2_)*chi;
00071
00072 return
00073 (scalar(1) + chi*fv1())
00074 *(1/Cv2_)
00075 *(3*(scalar(1) + chiByCv2) + sqr(chiByCv2))
00076 /pow3(scalar(1) + chiByCv2);
00077 }


rather than

fv3 = (1 + chi*fv1)*(1-fv2)/chi;

which is from SA-fv3 (http://turbmodels.larc.nasa.gov/spalart.html )

If this is because 'negative source' term which Henry mentioned on this thread, is there any reference for the current version?


Thanks

Yusik

Last edited by impecca; November 6, 2010 at 18:50. Reason: typo
impecca is offline   Reply With Quote

Old   December 1, 2010, 14:59
Default
  #36
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
This appears to be an issue again in 1.6-ext. In particular, 1.6-ext has fv2 = 1.0 - chi/(1.0 + chi*fv1), but also has fv3 != 0, which is the "Case 1" combination in Eric's earlier post that produces incorrect results.

It looks like the fv2 term was changed recently to move away from the "SA-fv3" model, but in that case, fv3 needs to be removed from the calculation of Stilda as well.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   February 1, 2011, 12:26
Default
  #37
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
In OF-1.6 the SA implementation is the so called SA-fv3 one, with fv2 consistent with the presence of fv3...This means that using this kind of implementation my calculations should be stable, but after reading all the replies in this tread still I don't understand if they should be also reliable...ok for the stability of the SA-fv3 model in complex cases, but what about the accuracy? However, I have also another question about the SA model usage: I've had a look into the source code for the nutSpalartAllmarasWallFunction and the nutSpalartAllmarasStandardWallFunction....Well, the latter is consistent with the nutWallFunction used in other RANS turbulence models, but the former seems to me quite obscure: can someone give me a brief explanation of what exactly it does? And, finally, does the SA model require to set nutSpalartAllmarasWallFunction for low-Re calculations? If it so, is this wall function suitable also for coarser grids or should it be replaced by nutSpalartAllmarasStandardWallFunction in such cases?

Thank you in advance for any opinion and/or suggestion

V.
vkrastev is offline   Reply With Quote

Old   February 1, 2011, 13:02
Default
  #38
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
I can't answer all of your questions, but I can tell you that nutSpalartAllmarasWallFunction is finding the friction velocity by solving Spalding's law of the wall, which is a non-linear equation for the law-of-the-wall that is valid from the wall out through the logarithmic region. The only place I could quickly find it written is in Eq 59 of this link.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   February 1, 2011, 13:21
Default
  #39
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20
vkrastev is on a distinguished road
Quote:
Originally Posted by boger View Post
I can't answer all of your questions, but I can tell you that nutSpalartAllmarasWallFunction is finding the friction velocity by solving Spalding's law of the wall, which is a non-linear equation for the law-of-the-wall that is valid from the wall out through the logarithmic region. The only place I could quickly find it written is in Eq 59 of this link.
Ok, so if I understand properly from the reference this is simply a more general form of wall function (compared with the standard one), wich gives a continuos solution for the friction velocity also in the buffer layer: this solution is then used to enforce a proper value for nut in the first computational node, right? In practice, this wall function could be (in principle) applied also to other RANS models, but if so I'm wondering why the OF programmers have decided to call it "SpalartAllmarasWallFunction"...However, thanks a lot, your link and reply were really helpful!

Best Regards

V.
vkrastev is offline   Reply With Quote

Old   May 30, 2012, 15:25
Default
  #40
New Member
 
Join Date: Nov 2011
Posts: 13
Rep Power: 14
0.1 watts is on a distinguished road
Quote:
Originally Posted by impecca View Post
Hi, I am following up LES version of Spalart-allmaras and have some questions.

Why fv3 is (which is from V1.7) ?

Code:
00067 tmp<volScalarField> SpalartAllmaras::fv3() const
00068 {
00069     volScalarField chi = nuTilda_/nu();
00070     volScalarField chiByCv2 = (1/Cv2_)*chi;
00071 
00072     return
00073         (scalar(1) + chi*fv1())
00074        *(1/Cv2_)
00075        *(3*(scalar(1) + chiByCv2) + sqr(chiByCv2))
00076        /pow3(scalar(1) + chiByCv2);
00077 }
rather than

fv3 = (1 + chi*fv1)*(1-fv2)/chi;

which is from SA-fv3 (http://turbmodels.larc.nasa.gov/spalart.html )

If this is because 'negative source' term which Henry mentioned on this thread, is there any reference for the current version?


Thanks

Yusik
This calculation of fv3 is still present in 2.1 and 2.0.1 in both the DES and RANS formulations (and by extension the DDES model too). I believe it must produce different results to the NASA description.

Is this term perhaps referenced to Ashford's thesis? I can't access it so I would be grateful if anyone can confirm whether it came from his thesis, or if not where it came from (or whether it is a bug).

EDIT: From looking at open access papers that do cite his thesis, I see that the fv3 term is the same as the NASA description but different to what's in the OF source code, so I suspect it doesn't come from Ashford.

Last edited by 0.1 watts; May 30, 2012 at 15:54. Reason: found some new info
0.1 watts is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 23:43
SpalartAllmaras question egp OpenFOAM Running, Solving & CFD 45 October 28, 2010 04:30
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


All times are GMT -4. The time now is 14:26.