|
[Sponsors] |
February 18, 2021, 09:32 |
Problem with gas mixing in closed domain
|
#1 |
New Member
PG company
Join Date: Feb 2021
Posts: 16
Rep Power: 5 |
Dear everyone,
My transient simulation parameters: - I have a simple, closed 10 l cubic fluid domain with 3 gases mixtrure, one of them has 0 mass fraction initially. The walls are adiabatic, the fluid model is laminar( but I tried turbulent, too). -Then I inject the third gas with the same temperature like initial temperature into domain through one small inlet.( The flow rate is 56 pa/s) - The mesh nodes number is 36000 ( but I also tried better mesh), the time step is 0.05 s. My expectations: - the pressure increase - the temperature stability - the internal 2 gas mass stability in the domain - the injected gas mass increase like I calculate My problem is that despite the good courant number, the imbalance is not good enough, the temperature is increase, the internal gases mass is decrease and the third gas mass in domain is lower then I calculate. The pressure change is good. So,the gas masses are lost or transformed, which is clearly not in accordance with the laws of physics. I am not sure, that the problem reason is the bad mesh and time step quality( because my inlet is much smaller then the volume) or some set up mistakes. Is there any special set ups for this case, which I has to use? Is anyone has experiances about this problem? Thank you for help. Nheni |
|
February 18, 2021, 10:39 |
|
#2 |
Senior Member
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,188
Rep Power: 23 |
You state your inlet is a pressure boundary? With 56 Pascals/s increase?
If you are using total energy model, temperature should increase due to compression, which is what your model is showing. I suspect you may be doing your hand calculations wrong, since you did not expect the temperature increase. You are likely not adding as much fluid as you think you are since pressure will rise faster than you thought due to the temperature increase. You can monitor this inflow in the solver manager, just make a plot to look at boundary flows: P-mass. How do you know the internal gas mass in decreasing? What expression are you using to determine this? how do you know your courant number is good? This could be a situation where you need to use the acoustic courant number, not the velocity courant number. you might want to try a simpler 0D simulation with just one mesh cell (use symmetry on all boundaries, and a source point for injection, which will calculate much faster. |
|
February 18, 2021, 17:21 |
|
#3 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
For verification, it is best to set a problem with a known solution first.
Say you know the initial conditions; therefore, we can compute the expression mass()@MyDomain Then, use a mass flow inlet boundary condition, and monitor the expression above. Since it is a mass flow boundary condition, the expression must increase monotonically, correct? Regardless of timestep and time discretization details since the BC is constant. In fact, the solution should be exact for a single element mesh. Once we got that one sorted out, changing the BC to a pressure inlet we can make a more detailed analysis of the results. Perhaps I am missing something, but the above is the general idea.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 18, 2021, 18:09 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144 |
In addition to the above comments, I would do this initial validation work with a single ideal gas as the fluid. Then you can compare against analytical results for the exact answer and know exactly how accurate your simulation is. Once you have worked out the time step, convergence criteria and everything else required to get this simple case accurate then you can move to your more complex case with the knowledge the basics are accurate.
Note: You say gas enters at a flow rate of 56 Pa/s. This is not a flow rate, I presume this is a rate of pressure increase. It also has the potential for the flow to reverse if the pressure is below the pressure of the domain. Are you sure this is the correct specification of the injected gas? At what pressure does it start? Where is this pressure measured (ie, is it before an injection device, at a compressor upstream or something else?)
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 19, 2021, 07:11 |
|
#5 |
New Member
PG company
Join Date: Feb 2021
Posts: 16
Rep Power: 5 |
Sorry for my inaccurate wording, I defined a mass flow rate(9.11e-06 kg/s) in inlet, which causes 56 Pa/s pressure change. And the walls are not adiabatic, just fixed temperature.
Evcelica, my hand calculation based just on Ideal Gas Low, pV=nRT , where V and R are constant, p and n are increase due to the inlet flow. I thought that T must be constant too, to ensure equality, but maybe I'm wrong. You have right, my acoustic courant number is 999, I did not know before, that I need to use the acoustic courant number in this case. I had a simulation, where my time step was 0.0001, there the acoustic courant number and imbalance was good, but I do not had enough time to wait for the end of this simulation. How do I know the internal gas mass in decreasing? I had another, my first simulation(I had many try) with more complicated geometry, I present these results because these are ran the longest,I attach these mass diagrams (the expression: volumeAve(Water Ideal Gas.Mass Concentration )@domain*volume()@domain). According to the simulation, the injected gas mass is 0.004153 kg after 338 s, but I define, that the mass flow is 0.00000911 kg/s ==> gas mass has to be 0.00308 kg. water mass.jpg 3. gas mass.jpg Ghorrocks, my simulations starts at 0.5 bar ( but I tried with 1 atm, I think that the values was wrong too), I measured the pressure in the whole domain (volumeAve(p)@Domain) The initial validation with single ideal gas is a good idea, I will try. Opaque, I will run simulations in the future with extended expression and monitor point list. Thank you all for your quick help! |
|
February 19, 2021, 07:22 |
|
#6 |
New Member
PG company
Join Date: Feb 2021
Posts: 16
Rep Power: 5 |
At the moment I see my problem partly due to the adiabatic compression (I found a description of it on the net) partly due to the wrong step setting due to the acoustic courant number. I hope that for the required time step the simulation will run during acceptable time. Do you think it is conceivable that in this case this time step would be below milicesundum?
Thank you again, Nheni |
|
February 19, 2021, 23:26 |
|
#7 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144 |
This is where you should use the simple material model, such as ideal gas, as I suggested. Compression of an ideal gas has an exact analytical answer so if you model it you know exactly how accurate you are. So you can develop your model (including working out what time step you need) to have the accuracy you require and then use those settings with confidence on your actual application.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX - specified domain intialization | qntldoql | CFX | 4 | September 28, 2020 10:28 |
Can I achieve better convergence? | sheaker | CFX | 12 | September 19, 2019 16:36 |
Turbomachinery Mass imbalance | sheaker | CFX | 12 | September 5, 2019 09:09 |
Floating point exception: Zero divide | liladhar | CFX | 11 | December 16, 2013 05:07 |
Gas pressure question | Dan Moskal | Main CFD Forum | 0 | October 24, 2002 23:02 |