rhoPimpleFoam Error: cannot be called for a calculatedFvPatchField on patch
Hello,
I am trying to simulate the flow of hydrogen in a combustion chamber, for which I intend to use the rhoPimpleFoam solver. I have carefully read the available documentation and looked at the boundary conditions of many RAS-cases for the solver. However, I encounter the following error, even though I have tried several combinations of boundary conditions and have also tweaked the thermophysical properties, unfortunately to no avail:- Code:
--> FOAM FATAL ERROR: The different files and the respective boundary conditions are as follows:- Code:
FoamFile Code:
FoamFile Code:
FoamFile Code:
FoamFile Code:
FoamFile Code:
FoamFile Code:
FoamFile Code:
FoamFile Code:
FoamFile Code:
FoamFile Kind regards, Shaeq |
hello,
I don't know how your geometry is defined, but I think your problem is related to the "calculated" BC's you are using on pressure and temperature. The calculated BC is only used on variables which are calculated from other variables (typically nut and alphat). On pressure and temperature you should use other boundary condition than calculated. Have a look at the rhoPimpleFoam tutorials to see how boundary conditions are defined for these variables. Regards, Yann |
Floating point exception error
2 Attachment(s)
Hello Yann,
Thank you for your kind suggestions. I have changed the boundary conditions in p and T from calculated to fixedValue. Although the solver now runs, it fails, however, after some iterations due to Floating point exception error and I am unable to diagnose where an invalid mathematical operation might have occurred. I have attached the snappyHexMeshDict and the error message file herewith. For further suggestions I would be highly grateful to you. Kind regards, Shaeq |
Can you describe what is your simulation domain and what boundary conditions you are using?
What are you inlet and outlet patches? The most important part is to pick a proper combination of boundary conditions on U and p. (typical setup: U fixedValue / p zeroGradient on inlet, U zeroGradient / p fixedValue on outlet). More information: https://doc.cfd.direct/notes/cfd-gen...ary-conditions Regards, Yann |
Case setup
1 Attachment(s)
Firstly, I should translate the different different parts of my geometry into English, which is as follows:-
I intend to conduct my study in two parts. Firstly, I want to simulate the inflow of the fuel (hydrogen) in the combustion chamber with rhoPimpleFoam solver. This in turn I have divided into two parts, viz. without and with the chemical reactions. For the second part, I want to simulate the injection process using Lagrangian approach, whereby I will remove the injector and use sprayFoam solver for this. Since I am only interested in the influx of fuel, I have not defined any outlet and I have turned off the chemistry properties for the first part of my simulations. The computational domain is the inner side of the injector and the combustion chamber. Morever, I have refined the region near the combustion chamber opening as the fuel flows in here. I am attaching a cross-sectional view of the compuational domain herewith. The injection needle is in the middle surrounded by the injector at its lower part. The fuel enters the injector at the top, i.e. at its inlet. At the bottom is the combustion chamber. Moreover, the boundary conditions for p, U and T are as follows:- Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Kind regards, Shaeq |
Thanks for the detailed explanation, it is easier to understand what you are doing now.
This is an unusual setup so I don't know if I can give you a proper setup but I think your issue is related to your boundary conditions. Just to be sure I understood correctly: in your current setup you have a enclosed domain (so walls everywhere) except for the injector inlet, right? What is driving the flow? From your setup I'm guessing pressure difference between inlet and internal pressure? If I am right, then I would set zeroGradient on walls for pressure and leaves the rest as it is for pressure inlet and velocity setup. I would except this to create a flow until the pressure inside the domain reaches the inlet pressure. But again, I never had to deal with such case so I can't guarantee it will work. Regards, Yann |
Hi Yann,
Thanks again for your valuable suggestion. Yes, you have correctly understood my case setup. There is only inlet and no outlet as I only need to study the fuel injection characteristics and the fuel is driven by the injection pressure, which is considerably above the atmospheric pressure. I have set the boundary conditions as per your suggestion, but the problem persists. However, when I change the thermophysical properties, whereby the option thermo is changed from hConst to janaf, the solver continues further. But it diverges heavily after some iterations and the temperature goes out of range of the Janaf tables. Another anomaly of note is that the epsilon values increase steadily, even reaching the order of 89. Can you suggest me some further improvements? Shall I also send you my mesh files so that you may be able to replicate the case? I really need to get it right and if I am able to achieve a breakthrough, I am more than hopeful that the rest of the simulations would follow somewhat easily. Best regards, Shaeq |
Hello Shaeq,
Maybe you can try to use the fvOptions limitTemperature and/or limitVelocity. It can sometimes help to avoid a simulation blowing up at the beginning of the simulation. You should find examples in the tutorials. Have you tried lowering your time step or using adjustable time step? Another idea could be to ramp your inlet pressure to avoid starting with a huge pressure difference between your inlet and internal volume. Regards, Yann |
Hello Yann,
As per your suggestion, I have employed limitTemperature constraint in fvOptions and adjustableRunTime. I have not activated limitVelocity constraint because it is a pressure-driven flow and so I do not know the typical velocities associated with it. After undertaking these measures, the solver runs smoothly for more than an hour. It runs, however, only for the first time step and thereafter it fails with the following messages:- Code:
[0] #0 Foam::error::printStack(Foam::Ostream&) at ??:? Kind regards, Shaeq |
Hello Yann,
The solver behaves the same way as before, even after enabling linear ramp for the pressure. What shall I do next? Moreover, could you explain to me the significance of bounding epsilon and k values? Kind regards, Shaeq |
Hello Shaeq,
It is hard to get useful information from your crash message. Are you monitoring the residuals? (if not, check the solverInfo function object) Another useful thing is to monitor min/max values of velocity and/or pressure using the fieldMinMax function object. It can help to see when and where things are getting wrong. The bounding message you get is related to the numerical schemes you are using on k and epsilon. The values you are reporting seems to indicate the simulation is diverging anyway. It could be related to your fvSolution / fvSchemes setup, mesh, time step (what maxCo are you using?), or something else... Regards, Yann |
I am not sure if you have done this already, but are there any errors thrown by
Code:
checkMesh |
Unable to realise injection in the combustion chamber
2 Attachment(s)
Hello Yann and Troy,
Thank you both for your valuable suggestions. Please excuse me for replying late as I had to change the geometry several times in order to remove the redundant parts and thus, to simplify the simulation, as advised by my supervisor. I have successfully been able to run the rhoPimpleFoam solver on the geometry. The fuel (H2 gas) flows through the inlet into the thin region between the injector and the needle. However, the flow of fuel stops right at the entrance of the combustion chamber and therefore, no fuel injection in the combustion chamber takes place as can be seen in the link below:- https://jumpshare.com/s/8TyzspWE4gfzufM2g2ir The computational domain, as can be seen in the image attached herewith, is consistent and connected throughout, and consists of the region between the injector and the needle, and the combustion chamber. Thus, it contains no walls in between, which would have otherwise blocked the flow. I have also attached an image of a previously conducted simulation study which I have to reproduce in OpenFOAM. I am unable to understand the cause of this problem and kindly request you to help me out. I would be glad to share the case files, if the need arises. Kind regards, Mohd Shaeq |
Can someone please provide me some suggestions on this issue?
|
Hello Mohd Shaeq,
The link provided in your previous post does not seem to work properly so we cannot see the issue you are mentioning. On your screenshot the mesh looks way too coarse, I don't know if it could be the cause of your problem. Regards, Yann |
Hello Yann,
The link is indeed broken. Please try the following one:- https://gifyu.com/image/SVUTa The mesh contains rough 3.9 Million cells and I had to zoom in on its pertinent parts in order to show them in detail. Maybe that is why it seems too coarse. The checkMesh log file is as follows:- Code:
/*---------------------------------------------------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ Mohd Shaeq |
Thanks for the link.
What behavior are you expecting? Your animation plots the pressure, it looks OK to me (high pressure in the injector and pressure dropping in the chamber) I would probably be more interesting to look at the velocity if you want to see if the fluid is flowing inside the chamber. Yann |
1 Attachment(s)
Thank you very much for your kind suggestion, Yann. I had made a visualisation error as the velocity flow indeed can be clearly visualised in ParaView by modifying the colour properties, which I had not done earlier:-
https://gifyu.com/image/SVfQG There remains, however, one problem: no flow of fuel (H2-Gas) is visible neither in the injector nor in the combustion chamber, as can be seen in the screenshot attached herewith. Can you please tell me why is this so? Kind regards, Mohd Shaeq |
You mentioned running rhoPimpleFoam, which does not support multi-species simulation, as far as I know.
You should probably use something like rhoReactingFoam for this. (you can use it without reactions if you are just interested in the species transport) |
Hi Yann,
Thank you for confirming what I already feared! I also came to the same conclusion that rhoPimpleFoam does not support multi-species simulation by monitoring the simulation run as there were no calculations for H2 to be seen. But it was too late when I observed it. I have tried running rhoReactingFoam but I get the following error in the second timestep:- Code:
/*---------------------------------------------------------------------------*\ Moreover, as mentioned in post #5 of this thread, I will run another simulation, this time with liquid H2 using sprayFoam. In order to compare the two injection processes, I would like to compare the vapour penetration length in the first case (with gaseous H2) with the penetration length for the second case (with liquid H2). With regard to this, which solver should I use? Is it possible to obtain vapour penetration length with sprayFoam just like liquid penetration length. I really appreciate your willingness to help me and taking time out in doing so. Kind regards, Mohd Shaeq |
All times are GMT -4. The time now is 07:13. |