Page 1 of 1
gasmixture with saturne
Posted: Mon Oct 08, 2012 9:55 am
by martin
hello,
is it possible to simulate the mixture of two gases with saturne?
There are two constant Volumes with different gases, pressures and temperatures. During the Simulation the gases should start to mix.
I already meshed two cylinders in salome. But now I`m not able to set them together and declare the different parameters.
Re: gasmixture with saturne
Posted: Mon Oct 08, 2012 11:26 am
by Yvan Fournier
Hello,
Yes, it is possible to simulate this, using an extra scalar variable per gas above 1 to define its volume fraction (the sum of volume fractions being 1). You then need to use user-defined physical laws (whether using MEI expressions in the GUI, or a user subroutine) defining the mixture's property based on the volume fraction of each gas.
In your initial conditions, the volume fraction of the second gas will be 0 in the first cylinder, 1 in the second. At calculation start, I assume both cylinders communicate, so the gases can mix (otherwise, defining the opening of a valve for example my require using time-dependent boundary conditions; as long as you do not need to change the mesh during the calculation, this is relatively straightforward).
Regards,
Yvan
Re: gasmixture with saturne
Posted: Tue Oct 09, 2012 11:37 am
by martin
thx for your help.
To simulate different Temperatures in each Volume is working now.
But how exactly can I declare the different pressures and fluid properties? In the "physical properties" folder is no field to select a zone.
regards
Re: gasmixture with saturne
Posted: Tue Oct 09, 2012 9:10 pm
by Yvan Fournier
Hello,
You cannot simulate multiple pressures under Code_Saturne. What you can do is consider that the gas you are simulating is a mixture, with a global pressure which is the sum of the partial pressures of the 2 fluids.
You then need to use an additional (user) scalar variable to define the volume fraction "alpha" of the second fluid (the volume fraction of the first is then 1 - alpha), and define global (variable) fluid properties based on that volume fraction. I ma not sure what diffusivity properties you should set for the volume fraction.
I attach here an xml file and user subroutines from an example (for Code_Saturne 2.3) illustrating this for a mix of Helium and CO2 (Helium being injected in the CO2).
I might not have much access to my e-mail these next few days, so I hope this is sufficient to illustrate the way this can be done.
Best regards,
Yvan