![]() |
Compressor Simulation using rhoPimpleDyMFoam
Hi
I am simulating compressor stage of a turbocharger with the rhoPimpleDyMFoam solver. running moveDynamicMesh -checkAMI was smooth without any errors which assures that my mesh rotates properly and i have defined my interfaces correctly , please point out if i am assuming this wrong. However running the solver my simulation crashes showing this Code:
/*---------------------------------------------------------------------------*\ Thanks |
Coming to my simulation i have to simulate compressor stage of a turbocharger
Meshing was done using ANSYS ICEM CFD , i had 3 mesh files 1. Inlet&Outlet 2.Volute 3.Rotor I imported them to openfoam using fluent3DMeshToFoam and then used mergeMeshes to make the complete domain, after that used splitMeshRegions -makeCellZones -overwrite to distinguish between the rotating zone and stationary zone. I am attaching few pictures of the domain so you could get a clear picture.Please have a look at them |
1 Attachment(s)
This is the complete domain of my simulation
|
1. How are you merging your three meshes that you have imported from fluent?
2. How did you create AMI patches? 3. Do you have 'sets' folder (with several domains) inside the constant folder? |
@vasava
As i have 3 mesh files 1.I created 3 case folders 1.Rotor 2.Volute 3.Inlet_Outlet 2. Placed the 3 mesh files into corresponding case folders and used fluent3DMeshToFoam fluent.msh -scale 0.001 for each to convert to meters 3.merged Rotor and volute , and then merged the combined mesh with Inlet_Outlet 4.used splitMeshRegions -makeCellZones -overwrite to create cell zones of different regions , 3 in my case To create the AMI patches i used the createPatchDict, I will attach it for your reference Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Hi,
Your problem seems to be in the turbulence model, I am guessing you have put epsilon equal to zero somewhere in either a boundary patch or the internalField. Change this to a sensible value for your case. Regards, Tom |
Your mesh setup seems alright. I agree with tomf, get some appropriate values for turbulence and use them in initial condition.
Also can you post your boundary file here? |
Hi ,
Sorry for the late reply and thanks for your response I have checked my epsilon file and have not put zero anywhere and ya as you have suggested i am working on my initial and boundary conditions as this might be the source of error. @vasava Here is my boundary file Code:
FoamFile |
Quote:
The boundary file looks ok but did you try any other turbulence setup?? |
1 Attachment(s)
Hi vasava,
Do you mean any of these two? I started with K-Epsilon as it was the basic turbulence model to start with. 1.K-omega SST 2.Spalart-Allmaras I am attaching my 0 folder , please take a look at my initial and boundary conditions and help me correct them. I have copied and modified the files from annularThermalMixer tutorial. |
You have provided a relative pressure of 0 Pa, you should put the absolute pressure. OpenFOAM does not use a "gauge pressure" or similar for compressible solvers. The solver now tried to solve for an absolute vacuum, which it could not do. I guess it only found out when density was required to calculated some part of the turbulence model.
For incompressible cases 0 m2/s2 is allowed since in that case the absolute pressure does not matter. Regards, Tom |
Quote:
I changed the pressure file as suggested by you creating a pressure difference between inlet and outlet but i still end up getting the same error . Alexeym has suggested this might be the cause of my error: Hi, as you've got FPE in mutkWallFunctionFvPatchScalarField::calcMut(), look at the source of the wall function: Code:
tmp<scalarField> mutkWallFunctionFvPatchScalarField::calcMut() const 1. rhow[faceI] == 0 2. muw[faceI] == 0 3. k[faceCellI] < 0 4. E_*yPlus <= 0 (this is not the case, cause yPlus > yPlusLam_) So you need to check if any of conditions 1-3 is true in your case. I am able to figure out that these conditions come from the equations to have a proper solution but unable to understand which values i should correct.Please explain me if you can interpret what the problem exactly is. Thanks |
Could you just show the p file, I was not talking about a pressure difference between inlet and outlet, I meant that you cannot have 0 Pa anywhere in the domain (internalField or any boundary condition), it should be around your absolute operating pressure (101325 Pa for standard atmosphere conditions).
I guess it should look something like this: Code:
/*--------------------------------*- C++ -*----------------------------------*\ Tom |
@tomf,
Thank you very much. Just changed my p-file as suggested by you, now my simulation started running!! :) I was always worried about the mut-file , dint expect the error was in my p-file.:confused: For now the simulation is running but too slow,have to run it in parallel and maybe some changes in my fvSchemes and fvSolution will do. il come back to you in case of any queries, thanks a lot! |
Hi ,
I am simulating compressor of a turbocharger using rhoPimpleDyMFoam with kOmegaSST turbulence model. Boundary conditons are as follows: mass flow outlet : 0.04 kg/s total pressure inlet:101325 total temperature inlet:298k compressor rpm: 300,000 Can you help me with my FvSchemes and FvSolutions as to what modifications i should be doing for better results. let me know if you need any more details about the simulation. FvSchemes Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Whats the matter with your current results? Any problems?
|
Hi RodriguezFatz,
I have started running the simulation and each timestep is taking a lot of time. Is there anything to do with my FvSolution or FvSchemes files to speed up my simulation? I am already running it on 8 cores. |
So at least there is no problem ...
|
Hi tobi,
My simulation has been running from past 1 day and still going on Here is the output Code:
Courant Number mean: 0.000114809 max: 1 |
Hi,
my simulations are running on 40 cores 2 weeks ... But you time step is very small and your density is wrong (I think) Code:
rho max/min : 2 0.5 I dont know what because you do not share many details. You should check out you time steps... maybe your pressure, velocity, k, epsilon are expoding. As I can see, you should use the correct form of the PIMPLE algorithm. Maybe it will be stabilized. Checkout my blog or also available at the wiki. |
1 Attachment(s)
Quote:
Hi tobi, My density is calculated based on inlet pressure and inlet temperature and it is 1.1845kg/m3. I have taken the FvSchemes and FvSolution files from the annularThermalMixer Tutorial under rhoPimpleDyMFoam as i am using the same solver and modified them. Can you please explain what values i should be giving for rho max/min: for my case. My time step is calculated using courant no. formula co=delT*U/delX I have set co max=1, my maximum velocity =78m/sec calculated using v = w*r w=31415 rad/sec , radius of impeller r = 5cm. min cell volume from my mesh is 5.37e-16 so delX is approx =8e-06, delT i found is 5.2e-09.Is this the right approach??? I have invested a lot of time in setting up my boundary conditions in the 0 folder. Attached is my 0 folder , please take a look and correct me if there is anything wrong. You can also find detailed explaination of my simulation in this thread http://http://www.cfd-online.com/For...ledymfoam.html Thanks |
Quote:
@Bruno - please move all posts refered to Jetfire question to the given thread. @Jetfire - double posts are not wished I will answer you in your thread! PS your link is wrong |
|
Hi,
Since Tobias uses this solver he will probably be the better contact, but here are some general things:
|
Hello,
some hints and question:
Code:
// Recalculate density from the relaxed pressure Code:
rhoEqn max/min : 2.15688 0.182153 . Code:
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5; As I told you befor, you should use the correct PIMPLE ALGO with underrelaxation. I refer (again) to my blog or to the wiki. There you will get how to set up these parameters: Code:
PIMPLE Code:
AMI: Creating addressing and weights between 1900 source faces and 32076 target faces Did you ever checked out if your mesh is okay? Code:
checkMesh -constant Code:
moveDynamicMesh -checkAMI
|
Hi Tobi,
Thanks for your reply Meshing was done using ANSYS ICEM CFD and the simulation was already run on CFX which gave good results.My task is to simulate the same on OpenFOAM. Code:
Did you ever checked out if your mesh is okay? I have even checked whether my AMI Interfaces were correct using moveDynamicMesh -checkAMI and it had run without any errors. Checked the compressor rotation on ParaView and the rotation was fine. Coming to my AMI Interfaces , i too have noticed that weights are not 1:1 but that is due to one interface on compressor being meshed with hex and it's neighbour interface on volute being meshed with tet elements. But as long as there is some weight matching the weight on target faces it is fine. This is not a problem as i have checked with moveDynamicMesh -checkAMI and it ran perfectly , otherwise i would have got errors there itself. Please look at the mesh domain i have posted earlier in this thread.There is only one rotating zone but there are 3 interfaces. 1. inlet and rotor 2.rotor and volute 3.connection between volute and outlet |
Quote:
-> red Line is wrong (SEE BELOW) Quote:
|
Hi,
good to know, well done. So then its clear that you have different faces. But you are not using PIMPLE as I told you 2 times befor. Have a look into the blog, wiki. Code:
Create mesh for time = 0 |
Quote:
Quote:
|
Quote:
|
Hi tobi,
I do not know what min or max rho for which calculation be done So according to you do i have to remove these lines from the pEqn.H file??? Code:
rho = thermo.rho(); Code:
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5; |
Hi Phillip,
sorry my fault (: I mixed the things up!
I wanted to say to use that one: Code:
Gauss linear limited 1 = Gauss linear uncorrected
|
Quote:
First you calculate your density: Code:
rho = thermo.rho() Code:
rho = min(rho, rhoMax) rho = 0.43 » 0.5 rho = 2.13 » 2.0 If the values are correct you have to change the cutted parameter in the fvSolution! At least - please read the blog or wiki for PIMPLE! |
Hi,
I have nowhere mentioned PISO algorithm, i dont understand why it is running it in PISO.Can you help me understand what changes i have to make to run it on PIMPLE. |
It's the "nOuterCorrectors". If set to "1", this is the same as running PISO algorithm. If set >1, it actually runs in real PIMPLE mode.
Solver PIMPLE solves multiple iterations of solver PISO during each time-step. So, if you just solve a single iteration of PISO (nOuterCorrectors=1) each time-step this comes up to PISO. |
I am not able to open your blog , i get this :(
Your host needs to use PHP 5.3.10 or higher to run this version of Joomla! |
Quote:
If you want to use PIMPLE and how it is working - go to my blog. I think you are too lazy to click on my blog on the left of that post :D so I be kind: BLOG WIKI I hope you will check it out now. There is everything mentioned - also like Philipp told you! You do not use the PIMPLE loop due to your settings in your fvSolution. Blog is on cfd-online :p |
Checking it now :)
I really thank you both for taking out your precious time and helping me out. Thanks a lot! |
Does the omega-bounding vanish, if you use the laplacian-setting I suggested?
|
Hi,
Sorry for the late reply , i was not at the work station for the rhomin/max , with reference to the air properties at atmospheric pressure in the link http://www.engineeringtoolbox.com/ai...ies-d_156.html I think my rhomin/max should not exceed the limits 0.524/2.793. But looking at the output there are timeSteps deviating from this for example. Code:
rhoEqn max/min : 2.15688 0.182153 . . GAMG: Solving for p, Initial residual = 1.49854e-09, Final residual = 1.49854e-09, No Iterations 0 rho max/min : 2 0.5 |
All times are GMT -4. The time now is 04:57. |