CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SteadyState solver for compressible flow (https://www.cfd-online.com/Forums/openfoam-solving/58316-steadystate-solver-compressible-flow.html)

francesco_b March 4, 2008 06:18

Hi Marco, send me a mail w
 
Hi Marco,

send me a mail with your case and I'll have a look at it, probably there is something wrong http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

My first suggestion is to avoid using FoamX, modify the files is often better and makes you understand more the code.

Second suggestion is to look at tutorials which are similar to your case, you'll find useful informations.

Regards

Francesco

sharmak March 4, 2008 07:14

Hi Thomas and Francesco, I
 
Hi Thomas and Francesco,

I added my email in my profile, you'll see it clicking on my name.
If you send me a mail I'll reply to you. I don't see your email adress.

I thank you for your kindness

Regards

cedric_duprat March 4, 2008 07:57

Hi Marco , About your previ
 
Hi Marco ,

About your previous error, just keep in mind that when you've sigFpe somewhere, it's often because you divide by zero somewhere.
are you sure about your BC ?
what are your initial values (k, epsilon) not only at your Patches but also your internal field value?
and, as said Francesco, tutorials are usually a good starting point.

Regards,

Cedric

sharmak March 4, 2008 14:19

Hi Cedric, no I was not sur
 
Hi Cedric,

no I was not sure and now I can say they were wrong. I can't use a steady state solver with those BC, is it true?
Anyway I changed BC and maybe the simulation is right now.

Regard

Marco

lgriffiths March 11, 2008 18:27

hi, what relaxation factors ar
 
hi, what relaxation factors are you using for rhoSimple Foam?

I had similar errors not too long ago due to wrong choice of factors

patankar [numerical heat transfer and fluid flow] suggests as a guidance:
0.2(pressure) 0.8(velocity) and that pressure+velocity factor = 1(approx)

also at the start of the iterations it may be useful to under-relax it by quite a lot (especially pressure) - not too sure on velocity - either trial & error, or maybe somebody who knows a little more than me can give some better input

sorry not too sure what your k&epsilon values should be, perhaps there's some published literature on it?

also francesco's advice to run the cases by hand is worth taking - i had a couple of problems with foamX not filling in the boundary conditions correctly.

dinonettis April 23, 2008 11:07

Hi everybody, I'm trying to
 
Hi everybody,

I'm trying to use rhoSimpleFoam to analyze a rae2822 profile (Ma=0.75). Starting from a case located in the rhoExplicitPorousSimpleFoam tutorial I made some minor corrections due the slightly different solver. Unfortunately this is what I get after 3-4 timesteps:


------------------------------------
Starting time loop

Time = 0.001

DILUPBiCG: Solving for Ux, Initial residual = 0.91642, Final residual = 0.00113156, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.497643, Final residual = 0.000109773, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 0.000153941, Final residual = 0.000153941, No Iterations 0
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.085924, No Iterations 10
time step continuity errors : sum local = 0.00341069, global = 6.72999e-18, cumulative = 6.72999e-18
bounding p, min: -183403 max: 51509.8 average: 14986
rho max/min : 0.434091 0.394052
DILUPBiCG: Solving for epsilon, Initial residual = 1, Final residual = 0.0760585, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 4.01958e-10, No Iterations 1
ExecutionTime = 1.1 s ClockTime = 2 s

Time = 0.002

DILUPBiCG: Solving for Ux, Initial residual = 0.625658, Final residual = 0.0132899, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.597063, Final residual = 0.0160514, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.0581808, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.999938, Final residual = 0.0994651, No Iterations 128
time step continuity errors : sum local = 0.371864, global = -5.50248e-16, cumulative = -5.43518e-16
bounding p, min: -3.58449e+07 max: 1.04555e+11 average: 2.88087e+10
rho max/min : 81429.1 0.407813
DILUPBiCG: Solving for epsilon, Initial residual = 0.538868, Final residual = 1.87952e-14, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.494746, Final residual = 2.88931e-11, No Iterations 1
ExecutionTime = 1.56 s ClockTime = 2 s

Time = 0.003

DILUPBiCG: Solving for Ux, Initial residual = 0.131877, Final residual = 0.0081574, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.588281, Final residual = 0.0125537, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 0.984923, Final residual = 0.0415359, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.999974, Final residual = 0.0957307, No Iterations 1
time step continuity errors : sum local = 3.01611e+06, global = -2.06632e-09, cumulative = -2.06632e-09
bounding p, min: -2.18384e+14 max: 3.72087e+16 average: 5.03564e+12
rho max/min : 2.89787e+10 -1.59075e+10
DILUPBiCG: Solving for epsilon, Initial residual = 0.994871, Final residual = 1.6861e-08, No Iterations 1
bounding epsilon, min: -26760.4 max: 4.40476e+23 average: 2.87204e+19
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 1.60288e-08, No Iterations 1
bounding k, min: -21.8637 max: 5.49352e+17 average: 3.58298e+13
ExecutionTime = 1.81 s ClockTime = 2 s

Time = 0.004

DILUPBiCG: Solving for Ux, Initial residual = 0.654315, Final residual = 0.0018068, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.192592, Final residual = 0.000735478, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 0.169146, Final residual = 0.000217519, No Iterations 1


--> FOAM FATAL ERROR : Maximum number of iterations exceeded#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/nettis/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/nettis/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::calculate() in "/home/nettis/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libbasicThermophysical Models.so"
#3 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::correct() in "/home/nettis/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libbasicThermophysical Models.so"
#4 main in "/home/nettis/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/rhoSimple Foam"
#5 __libc_start_main in "/lib64/libc.so.6"
#6 Foam::regIOobject::readIfModified() in "/home/nettis/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linux64GccDPOpt/rhoSimple Foam"


From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.4.1/src/thermophysicalModels/specie/lnInclud e/specieThermoI.H at line 83.

FOAM aborting
----------------------------------


I hope somebody can help me!!!
thank you in advance,

dino

dinonettis April 23, 2008 12:02

ps: I forgot to specify that I
 
ps: I forgot to specify that I've imported the 0/U file from the solution found with potentialFoam. This one seems to be corrected, but I don't know if it could influence the problem I've shown in my previous post!!

dino

dabon May 8, 2008 16:58

Hi Leonardo, I'm trying to do
 
Hi Leonardo, I'm trying to do a similar experiment to yours (RAE2822 at M=0.72) but I've a lot of troubles trying to set up the simulation with rhoSimpleFoam. I'm trying to use a test case from rhoExplicitPorousSimpleFoam but it does not work. Could you send me your test file (without the mesh, I use a mesh converted from Gambit) so maybe I can progress? I hope you can help me.
Thanks a lot

Daniele

vishal October 23, 2008 08:18

Hi Fomers, I am working wit
 
Hi Fomers,

I am working with the prism case in sonicTurbfoam, but i want to capture the shoch at the prism surface.for Mach number 3. i have created mesh for that accordingly. but.....i am unable to find the grad rho at the surface of the prism.

Can i use other foam for this case for compressible flow and steady state so that i can capture grad roh at surface.

vishal October 23, 2008 08:21

Hi, ihacve one more query
 
Hi,

ihacve one more query i dont have foamX directory in the OpenFoam 1.5 version i have installed. till now i was working with command prompt.

Can anyone tell me how can i get in as i want need it to deal with complex scinario.

Thanks

paul_mathis November 18, 2008 05:48

Hello, could anyone please
 
Hello,

could anyone please translate the hEqn implemented in rhoSimpleFoam into mathematical language, please? Most of all, I am interested in figuring out whether the total or the static enthalpy is used.

The equation for total enthalpy (steady state) found in literature looks like this:

Ñ(r U h<sub>tot</sub>) = Ñ(l Ñ T) + Ñ(U t) + S<sub>E</sub>

h<sub>tot</sub> = h + 0.5 U<sup>2</sup>
Ñ(U t) = viscous dissipation
S<sub>E</sub> = source term

C++ code:


fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)"))
- p*fvc::div(phi/fvc::interpolate(rho))
);

Thank you very much,
Paul

paul_mathis November 19, 2008 07:31

OK, answering my question myse
 
OK, answering my question myself:

The enthalpy equation is impemented in terms of static enthalpy, making the C++ code appear in mathematical language:

fvm::div(phi, h) = Ñ•(rU h)

fvm::Sp(fvc::div(phi), h) = S<sub>E</sub> (source term, not sure about this)

fvm::laplacian(turbulence->alphaEff(), h) = Ñ•(a<sub>eff</sub>Ñh)

fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)")) = Ñ•(p U)

p*fvc::div(phi/fvc::interpolate(rho)) = p Ñ•U


Consequently:

Ñ•(rU h) - S<sub>E</sub> - Ñ•(a<sub>eff</sub>Ñh) = Ñ•(p U) - p Ñ•U

where Ñ•(p U) - p Ñ•U = U •Ñp

That means the viscous dissipation term t:ÑU is not implemented.

I have added a viscous term into the equation, but instead of rising the temperature decreases! Where is my mistake?

My enthalpy equation:

volSymmTensorField tau(turbulence->devRhoReff());
volScalarField tauGradU = tau && fvc::grad(U);
fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)"))
- p*fvc::div(phi/fvc::interpolate(rho))
+ tauGradU
);

bastian_s November 21, 2012 04:27

Check Sign of Dissipation
 
Hi paul_mathis,

did you solve this problem within the last 4 years?:)

It seem likely that the dissipation (turbulence->devRhoReff() && fvc::grad(U)) has the wrong sign for an unknown reason. I created a dissipation field, displayed it in paraFoam and got negative values in the whole field.

I think implementing Phi with (-turbulence->devRhoReff() && fvc::grad(U)) should solve the problem. Is anyone familiar with the sign conventions of either the viscous stresses or the velocity gradient in openFoam?

regards

Bastian


All times are GMT -4. The time now is 03:31.