|
[Sponsors] |
February 5, 2013, 13:27 |
whats wrong with "sqr(internalField(U.x))"?
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
why OpenFOAM gives an error about U.x?
Code:
Selecting turbulence model type laminar Starting time loop Time = 5.6e-09 Courant Number mean: 2.703201494e-20 max: 1.290382332e-16 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 swak4Foam: Allocating new repository for sampledGlobalVariables DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.073282789e-22, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 2.073273772e-22, No Iterations 2 DILUPBiCG: Solving for e, Initial residual = 0.0006828527063, Final residual = 3.08254255e-26, No Iterations 2 --> FOAM FATAL ERROR: Parser Error at "1.34" :"syntax error, unexpected '.', expecting ')'" "1+(gamma-1)/2*sqr(internalField(U.x))/(gamma*R*internalField(T))" " ^ " From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 802. FOAM exiting |
|
February 5, 2013, 17:07 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
I've examined other possible types but the error persists.
|
|
February 5, 2013, 19:10 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Try:
Code:
internalField(U).x
__________________
|
|
February 12, 2013, 12:40 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
thanks.
are sqr(mag(internalField(U))) and magSqr(internalField(U)) the same? |
|
February 12, 2013, 17:15 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Right now I'm too sleepy to properly think. I can't figure out how these operations affect vectors, but I think that for matrix tensors those two are not the same. But if you take a look at the OpenFOAM Programmers Guide, pages 16, 19 and 20, you'll find more specific information on this. Maybe start reading from the beginning of Chapter 1 is the best. This will give you a better understanding of how OpenFOAM handles math operations, which you might have to document in your thesis. There is a PDF file of the Programmers Guide in the main OpenFOAM source code folder, specifically at "doc/Guides-a4". Be careful with this guide, because it has some flaws in it... but I think "mag", "sqr" and "magSqr" should all be properly defined. Best regards, Bruno
__________________
|
|
February 13, 2013, 06:53 |
|
#6 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
thanks dear Bruno
I had read that before and took a look again.but nothing had write definitely about these terms.I think they are related to groovyBC library.Im going to have a look at its guidance if help. any idea is appreciated. |
|
February 26, 2013, 18:20 |
|
#7 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
have anyone any idea about the expressions?are they different or equivalent certainly?
|
|
September 10, 2013, 14:59 |
|
#8 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21 |
For the definitions given on http://www.foamcfd.org/Nabla/guides/...sGuidese4.html the two things should be the same.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf error | srihari | FLUENT | 1 | October 31, 2016 14:18 |
Wrong wall distance with cyclic boundaries | sebastian | OpenFOAM Bugs | 4 | October 31, 2012 10:24 |
Wrong oriented faces due to opposite face bends? | Arnoldinho | OpenFOAM | 5 | August 16, 2012 05:00 |
BuoyantBoussinesqSimpleFoam and axial-symmetric results wrong mass flow | Thomas Baumann | OpenFOAM | 6 | December 21, 2009 10:31 |
Pressure contour seems wrong??? | Harry Qiu | FLUENT | 1 | June 29, 2001 05:53 |