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/)
-   -   Compressor Simulation using rhoPimpleDyMFoam (https://www.cfd-online.com/Forums/openfoam-solving/143340-compressor-simulation-using-rhopimpledymfoam.html)

Jetfire November 12, 2014 00:35

Quote:

Originally Posted by RodriguezFatz (Post 518520)
Jetfire, did you try to use some other decomposition method? I had a very simple pipe flow and thought it is a clever idea to use "simple" decomposition. It showed low number of shared faces and all that stuff, but for some reason it was slower than just using "scotch" without any additional settings. You can just try some different methods and write down the different execution times. It's worth it for such long simulations to try a bit at the beginning.

I tried decomposing the case with simple method. Very low no. of faces is being shared between processors as low as 2 and 6. Maybe hierarchical is better for this case. Even tried different combinations for breaking up the subdomains for hierarchical ex (4 1 2 ) , this is also not good. Decomposition with ( 2 2 2 ) is ok propably.

Tobi November 12, 2014 03:58

Quote:

Originally Posted by Jetfire (Post 518636)
@Tobi do not refer to those boundary conditions, those were from annular thermal mixer tutorial, I am attaching my final 0 folder for your reference, do let me know if you need any other details.

Hi,

boundary conditions
  • Temperature could be fixedValue at inlet (I have to have a look into the source code what are the differences of totalTemperature and fixedValue)
  • U Inlet - does it make sence to put an inlet value ? You have a pump and therefor the inlet value is calculated due to the RPM's of your pump. In reality I always have pumps when I want to build/establish a flow ;), therefor I would use pressureInletVelocity there.
  • U Outlet - if you apply totalPressure for p there you can check "inletOutlet" or pressureInletOutletVelocity
  • omega inlet: use the mixing frequency inlet instead of fixed value


decompose the mesh
  • as Philipp and I told you, its up to you and these are only hints. I think your mesh could be better splitted if you
  1. rotate your mesh that it is align with x, y, z origin system
  2. split it then
But it is up to you!

your error
  • At the moment its a bit strange because the enthalpy is calculated and already outputted. After that the error occur. Maybe during some calculations after that but I am not sure which function is called after the output of the enthalpy calculation.
  • As Philipp mentioned before, you should !!! save each time step you calculate and have a look at the results. You can find a lot of problems doing so and try to solve it.


what should you do first now
  1. change controlDict to save each time step
  2. change your boundary conditions
  3. solve and check your results
  • it could be possible that due to your BC you have a lot of problems!




Jetfire November 12, 2014 04:30

Quote:

Originally Posted by Tobi (Post 518671)
Hi,

boundary conditions
  • Temperature could be fixedValue at inlet (I have to have a look into the source code what are the differences of totalTemperature and fixedValue)
  • U Inlet - does it make sence to put an inlet value ? You have a pump and therefor the inlet value is calculated due to the RPM's of your pump. In reality I always have pumps when I want to build/establish a flow ;), therefor I would use pressureInletVelocity there.
  • U Outlet - if you apply totalPressure for p there you can check "inletOutlet" or pressureInletOutletVelocity
  • omega inlet: use the mixing frequency inlet instead of fixed value

  • From what boundary and initial conditions I have, i am provided with total pressure inlet of 1atm , i need to know the pressure at the outlet which will be calculated by the inletOutlet and thereby i get the pressure ratio p2/p1 of the compressor.
  • I have total temperature of 298k at inlet. I need to find out the outlet temperature from the simulation.
  • For the velocity conditions , i have been provided the mass flow rate at outlet = 0.04914 kg/sec. So i have given the same value at inlet as flowrateinletvelocity because of continuity and at outlet have given inletOutlet. Is this wrong?
  • Should i give zeroGradient condition instead of inletOutlet for the pressure, temperature and velocity at outlet??

Tobi November 12, 2014 04:40

For me this makes no sence... maybe Philipp or Tom will answer you this question.

Jetfire November 12, 2014 05:00

1 Attachment(s)
Quote:

Originally Posted by Tobi (Post 518671)
Hi
  • as Philipp and I told you, its up to you and these are only hints. I think your mesh could be better splitted if you
  1. rotate your mesh that it is align with x, y, z origin system
  2. split it then
But it is up to you

I have rotated my mesh and tried aligning with the axis , inlet is parallel to X and outlet to Y.

Output from decomposePar, used subdomain division (2 4 1) , I think this is slightly better compared to previouse one here http://www.cfd-online.com/Forums/ope...tml#post518507 .please comment
Code:

Processor 0
    Number of cells = 828661
    Number of faces shared with processor 1 = 9078
    Number of faces shared with processor 2 = 28421
    Number of faces shared with processor 3 = 11335
    Number of processor patches = 3
    Number of processor faces = 48834
    Number of boundary faces = 85632

Processor 1
    Number of cells = 828661
    Number of faces shared with processor 0 = 9078
    Number of faces shared with processor 3 = 17113
    Number of processor patches = 2
    Number of processor faces = 26191
    Number of boundary faces = 81355

Processor 2
    Number of cells = 828661
    Number of faces shared with processor 0 = 28421
    Number of faces shared with processor 3 = 15007
    Number of faces shared with processor 4 = 27368
    Number of faces shared with processor 5 = 1229
    Number of processor patches = 4
    Number of processor faces = 72025
    Number of boundary faces = 57213

Processor 3
    Number of cells = 828661
    Number of faces shared with processor 0 = 11335
    Number of faces shared with processor 1 = 17113
    Number of faces shared with processor 2 = 15007
    Number of faces shared with processor 5 = 13092
    Number of processor patches = 4
    Number of processor faces = 56547
    Number of boundary faces = 69703

Processor 4
    Number of cells = 828661
    Number of faces shared with processor 2 = 27368
    Number of faces shared with processor 5 = 20564
    Number of faces shared with processor 6 = 9942
    Number of processor patches = 3
    Number of processor faces = 57874
    Number of boundary faces = 57452

Processor 5
    Number of cells = 828661
    Number of faces shared with processor 2 = 1229
    Number of faces shared with processor 3 = 13092
    Number of faces shared with processor 4 = 20564
    Number of faces shared with processor 6 = 1159
    Number of faces shared with processor 7 = 14195
    Number of processor patches = 5
    Number of processor faces = 50239
    Number of boundary faces = 67825

Processor 6
    Number of cells = 828661
    Number of faces shared with processor 4 = 9942
    Number of faces shared with processor 5 = 1159
    Number of faces shared with processor 7 = 20886
    Number of processor patches = 3
    Number of processor faces = 31987
    Number of boundary faces = 81669

Processor 7
    Number of cells = 828661
    Number of faces shared with processor 5 = 14195
    Number of faces shared with processor 6 = 20886
    Number of processor patches = 2
    Number of processor faces = 35081
    Number of boundary faces = 88809

Number of processor faces = 189389
Max number of cells = 828661 (0% above average 828661)
Max number of processor patches = 5 (53.8462% above average 3.25)
Max number of faces between processors = 72025 (52.1208% above average 47347.2)


vasava November 12, 2014 08:02

@ jetFire: What was the range of pressure and temperature in the last time after which the simulation crashes?

RodriguezFatz November 12, 2014 08:04

Quote:

Originally Posted by Jetfire (Post 518691)
please comment

I always try just a few times. Decompose -> benchmark -> Decompose differently -> benchmark. Then, I choose the fastes one.

Jetfire November 12, 2014 23:39

@vasava

You can find the output for the last time step here.

http://www.cfd-online.com/Forums/ope...tml#post518635

Tobi November 13, 2014 02:17

Vasava means the analyse of your simulation ... Not the log file

Jetfire November 13, 2014 03:48

I had read few threads about the same error, few people felt this error was due to the mesh refinement.Coarsening the mesh may solve the problem but not sure. I have increased nCellsInCoarsest level to 400 and trying with constTransport model , not using sutherland

RodriguezFatz November 13, 2014 04:05

You are mixing several things Jetfire.
1) He does not mean the residual of the pressure solver but the actual physical values of pressure in your domain. You need to have a look at paraView.
2) Setting nCellsInCoarsest is a solver setting that has nothing to do with "coarsening the mesh". It just sounds somehow similar.

Jetfire November 13, 2014 04:20

Ok, I will let you know soon

vasava November 14, 2014 06:30

This may sound obvious but from what i have read I feel that the error is coming from the Sutherland Coefficient part. If I am not wrong Sutherland viscosity has limitations with operating pressure and temperature. If they are outside the limits perhaps openfoam would have difficulties guessing the right material properties. Thats is the reason why I ask for those values.

Anyway, If I were you I would first try with normal viscosity and little lower rotational speed and see if everything works. Doing this will let me know if there is any additional issues with mesh, convergence and stability. Also its might help me predict the initial turbulence parameter better (just incase).

Although openfoam handles the difference in meshes at cyclicAMI but you must do your part as well to make them as identical or almost identical. At 300000 RPM this is already a complicated and heavy computing case (high turbulence and large mesh that you need).

Jetfire November 16, 2014 23:25

Hi guys,

After 2-3 days of the simulation running with different thermophysical model( constTransport).I end up getting this error .
Code:

PIMPLE: iteration 4
DILUPBiCG:  Solving for Ux, Initial residual = 4.698848279e-06, Final residual = 1.728346388e-10, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.0004148947624, Final residual = 1.605476696e-08, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0004124625538, Final residual = 1.720494925e-08, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.001073898534, Final residual = 4.419787961e-07, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.0001402588605, Final residual = 4.530336629e-12, No Iterations 1
GAMG:  Solving for p, Initial residual = 1.270429705e-09, Final residual = 1.270429705e-09, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.21975605e-05, global = -1.193260374e-05, cumulative = -0.03947889224
rho max/min : 2.5 0.1
GAMG:  Solving for p, Initial residual = 9.809918063e-05, Final residual = 3.149546253e-12, No Iterations 1
GAMG:  Solving for p, Initial residual = 8.907323553e-10, Final residual = 8.907323553e-10, No Iterations 0
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.219755365e-05, global = -1.193260374e-05, cumulative = -0.03949082484
rho max/min : 2.5 0.1
DILUPBiCG:  Solving for omega, Initial residual = 5.101593458e-07, Final residual = 2.047378385e-11, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 4.414193461e-06, Final residual = 7.768684524e-10, No Iterations 1
PIMPLE: iteration 5
DILUPBiCG:  Solving for Ux, Initial residual = 3.853220256e-06, Final residual = 1.380582769e-10, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.0003599162519, Final residual = 1.39347785e-08, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0003569465205, Final residual = 1.390306585e-08, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.001096976628, Final residual = 4.135438555e-07, No Iterations 1
[3]
[3]
[3] --> FOAM FATAL ERROR:
[3] Maximum number of iterations exceeded
[3]
[3]    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
[3]    in file /home/eatin/OpenFOAM/OpenFOAM-2.3.0/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.
[3]
FOAM parallel run aborting
[3]
[3] #0  Foam::error::printStack(Foam::Ostream&) in "/home/eatin/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[3] #1  Foam::error::abort() in "/home/eatin/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[3] #2  Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>::T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double) const) const in "/home/eatin/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
[3] #3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() in "/home/eatin/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
[3] #4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() in "/home/eatin/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
[3] #5 
[3]  in "/home/eatin/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/rhoPimpleDyMFoam"
[3] #6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[3] #7 
[3]  in "/home/eatin/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/rhoPimpleDyMFoam"
--------------------------------------------------------------------------
mpirun has exited due to process rank 3 with PID 28754 on
node EAT-Standalone exiting improperly. There are two reasons this could occur:

1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.

2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"

This may have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------

From this what i can infer is
  1. Maybe my mesh has bad cells which cause this error.
  2. My boundary and initial conditions are not correct
  3. variation in pressure and temperature is very high
  4. OpenFOAM is not yet capable and robust to perform this kind of turbomachinery simulations
Any further leads on this will be helpful

Jetfire November 17, 2014 00:12

4 Attachment(s)
I was able to run the simulation upto 1.9375e-07 after which it should the error posted above. Based on some threads I have read it may be better to use zeroGradient conditon for pressure and temperature at outlet.

As vasava asked for the pressure and temperature range
Temperature: 221 - 408 k
pressure: 1.84e+04 - 2.92e+05
Please Check the pictures attached.

Tobi November 17, 2014 02:46

What about U k omega?
And as I told you, for me your bc are wrong (:

Jetfire November 17, 2014 03:03

Quote:

Originally Posted by Tobi (Post 519511)
What about U k omega?
And as I told you, for me your bc are wrong (:


U mag: 0 - 510
K: 11.7 - 27.4
Omega: 94.1 - 221

Simulating compressor of a turboCharger.
I have taken the same boundary conditions given in CFX for the simulation.

Tobi November 17, 2014 05:22

Never compare CFX, FLUENT settings with OpenFOAM settings.
Fluent and CFX always have some settings you do not see.

I had a discussion about that with Bernhard and please never think that if you apply the fluent/cfx conditions to openfoam that this is sufficient and the calculation should work. Maybe your settings in CFX are also very bad and non physical.

Fluent/CFX is more robust for wrong user input and in most of all cases it will give you some result. If you want to use foam in a good way, you have to know how things are working and what BC are correct, how many you can/have to set to make the equations solvable. Therefor you should have a knowledge at:
  • Numeric
  • Fluid Dynamics
  • Physics
  • Discretization
  • .
  • .
  • .


Most of these things should always be available for all who make CFD simulations but I know a few people which do not know anything about it and they still do it and get results with fluent and cfx. I dont want to say that these toolboxes are bad but much more user friendly (especially in user input things, stability etc.). Thats the reason why a lot of people think foam is not able to solve complex things because the solver crashes all the time etc.
But the problem is: they dont know why!

Jetfire November 21, 2014 00:20

Hi ,

I tried running the simulation with the constTransport thermophysical model

few changes to boundary condition
zeroGradient instead of inletOutlet at the outlet for pressure and temperature
for velocity inlet i have used pressureInletVelocity and at outlet flowRateInletVelocity

Even with these I get the same error as posted before. As I am approaching my project deadline I have to start writing the report , maybe there is a problem with the mesh/ Boundary conditions or this is a too complex simulation as it has 3 interfaces and compressor rotates at 300000 rpm that OpenFOAM can handle as of now. So I am stopping the simulation and closing the project.

It was really nice of you guys @Tobi @RodriguezFatz @vasava for trying to help me out in each and every step of the simulation and taking your time to explain the concepts involved in the simulation. I thank all of you for your kind support and I will surely acknowledge your efforts in my report :)

Thank you!!

crixman November 29, 2014 04:52

Dear all,
thank you for the interesting topic, I learned more on rhoPimpleDyMFoam here than by searchign the entire forum!

I have some doubts of the BCs I see in the last attachment: jetfire basically places, for p,U,T, inlet fixed values (or mass flow rate) and inletOutlet at outlet. Would not be better to provide values for both inlet and outlet, maybe leaving inletOutlet only for T?

As I have a similar case for which I know the input pressure, the outlet pressure (atmospheric p), the atmospheric temperate at outlet and the inlet velocity, should I use something like this:
-inlet: U fixed Value (or flowRateInletVelocity), p totalPressure, T inletOutlet
-outlet: U inletOutlet, p fixedValue 101325 Pa, T 293K
?

I got also floating point errors similar to the one had by jetfire at page 3 (foamHePsiThermo), should I use the constant transport properties?

My rpm velocities are much lower so I should not have the turbulence problems that jetfire had rotating at 300k rpm!

vasava December 1, 2014 01:41

Quickly, if I were you I would not use fixedValue for inlet velocity if I am specifying pressure at the inlet. Instead use pressureInletOutletVelocity.

Also you are using fixed temperature at the outlet. Do you already know the temperature or you want openfoam to calculate the temperature? I would use fixed temperature at inlet and inletOutlet at outlet for temperature.

Please provide error messages, material properties and boundary files in the /0 folder.

maHein December 2, 2014 02:58

I would specify total pressure and temperature at the inlet and static pressure at the outlet. Most of the time, defining a uniform velocity profile at the inlet is rather nonphysical.

You could use pressureInletOutletVelocity for the U at the boundarie.

crixman December 2, 2014 09:39

thank you for the replies.
As you recommended, I specified the temperature at inlet and inletOutlet at outlet, and pressureInletVelocity for U at inlet.

If someone is interested, the same BCs do not converge on rhoSimpleFoam if I refine the mesh!

maHein December 2, 2014 09:43

Have you tried lowering the relaxation factors when using the finer mesh?

crixman December 3, 2014 07:04

Not really - I should check it, but I think it's more a SIMPLE algorithm problem than a matter of relaxation factors

Tobi December 3, 2014 07:23

Quote:

Originally Posted by crixman (Post 522275)
Not really - I should check it, but I think it's more a SIMPLE algorithm problem than a matter of relaxation factors

Do not understand your statement?
Relaxation and SIMPLE is like a married couple (:
Without relaxation you will not can run SIMPLE in complex cases. This is due to some missing terms in the pressure prediction (see also Ferziger and Peric).

crixman December 6, 2014 06:59

You are right - I meant it is possibly due to the fact that it is a very unsteady case and is probably not the best case to use SIMPLE - I am having good results with PIMPLE solvers so I'll stick to that for now

crixman December 9, 2014 13:38

I am having AMI floating point exception problems when restarting the simulation from latestTime.
I got the same problem first when running renumberMesh in parallel after decomposePar - running rhoPimpleDyMFoam after decomposePar solved the problem.
Any ideas on how to solve this AMI issue at restart? Maybe someone had the same problem!


All times are GMT -4. The time now is 08:16.