CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SonicTurbFoam initialisation (https://www.cfd-online.com/Forums/openfoam-solving/60262-sonicturbfoam-initialisation.html)

 anger April 6, 2006 05:09

Hi all, I have a problem ru

Hi all,

I have a problem running sonicTurbFoam.
I created initial fields (U, p, k, epsilon, phi) for a sonicTurbFoam calculation using simpleFoam. But when starting the calculation, the following error occurs:

Starting time loop

Mean and max Courant Numbers = 10.5008 inf
Time = 100.01

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
[2]
[2]
[2] --> 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]
[2]
[2]
[2] From function operator+(const dimensionSet& ds1, const dimensionSet& ds2)
[2] in file dimensionSet/dimensionSet.C at line 357.
[2]
FOAM parallel run aborting

I'm aware that this has something to do with the
calculation of the viscosity. Is there any way to surpass this problem?

best regards,
-Thomas

 hartinger April 6, 2006 07:40

Hi Thomas, you can't use th

Hi Thomas,

you can't use the results from simpleFoam directly in sonicTurbFoam. simpleFoam solves for 'specific pressure' (p/rho) [m^2/s^2], whereas sonicTurbFoam
solves for pressure [kg/(m*s^2)]. So the units don't match and would need to multiply the pressure with density and make sure the dimensions in the resulting Foam-file are correct.
And simpleFoam uses kinematic viscosity. Check what sonicTurbFoam uses.

regards
markus

 anger April 6, 2006 09:15

Hello Markus, thanks for th

Hello Markus,

thanks for these hints. I actually had two errors in my setup which prevented sonicTurbFoam from running:
1. as you already pointed out, the dimension of p is different in simpleFoam and sonicTurbFoam
2. I had the face flux field p as starting condition, which also has the wrong dimensions.

Deleting this field and changing the dimensions of p did the trick.

best regards
-Thomas

 hartinger April 6, 2006 09:35

good, but just adjusting the d

good, but just adjusting the dimensions doesn't give the correct results.
you could modify the existing simpleFoam and create a new volScalarField pRho = p * rho

markus

 All times are GMT -4. The time now is 23:18.