Difference between revisions of "Ideal Gas Material"

From OSUPDOCS
Jump to navigation Jump to search
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Constitutive Laws ==
== Constitutive Laws ==


This [[Material Models|MPM material]] models either an ideal gas or a non-ideal van der Waals gas. Note that MPM is not in ideal method for modeling gas dynamics. The main use of this material type is when combine gas material points interact with other material types. TO optimize such modeling, the gas pressure can be is tracked by one of two methods:
This [[Material Models|MPM material]] models either an ideal gas or a non-ideal van der Waals gas. Note that MPM is not in ideal method for modeling gas dynamics. The main use of this material type is when combining gas material points with other material types. To optimize such modeling, the gas pressure can be tracked by one of two methods:


# '''Actual Pressure''': Set reference pressure to <math>P_0</math> and track total pressure, <math>P</math>, on the each particle from gas laws.
# '''Actual Pressure''': Set reference pressure to <math>P_0</math> and track total pressure, <math>P</math>, on the each particle from gas laws.
# '''Gauge Pressure''': Omitting reference pressure material property, <tt>P0</tt>, tells the calculation track a gauge pressure, <math>p = P - P_0</math> where <math>P_0</math> is the gauge pressure set to 1 atmosphere (= 0.101325 MPa), on each particle. In other words 1 atmosphere pressure is a new baseline that correspond to zero gauge pressure on the particle.
# '''Gauge Pressure''': Omitting reference pressure material property, <tt>P0</tt>, tells the calculation track a gauge pressure, <math>p = P - P_0</math> where <math>P_0</math> is the gauge pressure set to 1 atmosphere (= 0.101325 MPa), on each particle. In other words 1 atmosphere pressure is a new baseline that correspond to zero gauge pressure on the particle.


The "Actual Pressure" works best when modeling just an ideal gas. The "Gauge Pressure" method appears to work better when gas particles are interacting with other materials (all of which have zero stress under starting conditions).
The "Actual Pressure" method works best when modeling just gas particles confined to a box by boundary conditions. The "Gauge Pressure" method appears to work better when gas particles are interacting with other materials (all of which have zero stress under starting conditions).


== Ideal Gas Law ==
== Ideal Gas Law ==
Line 51: Line 51:
</math>
</math>


Note that these laws revert to ideal gas law when <math>a'=b'=0</math>. The constant <math>b'</math> can also be written as <math>b'=bn/V_0</math> which is a dimension value that corresponds to fraction of the reference volume that is occupied by gas molecules (an ideal gas ignores volume of gas molecules).
Note that these laws revert to ideal gas law when <math>a'=b'=0</math>. The constant <math>b'</math> can also be written as <math>b'=bn/V_0</math> which is a dimensionless value that corresponds to fraction of the reference volume that is occupied by gas molecules (an ideal gas ignores volume of the gas molecules).


== Reference State ==
== Reference State ==
Line 67: Line 67:
<math>\rho_0 = \frac{nM_g}{V_0}</math>
<math>\rho_0 = \frac{nM_g}{V_0}</math>


where <math>M_g</math> is molecular weight of the gas molecule. Using reference state calculations, this density for both ideal and van der Waals gas can be found from
where <math>M_g</math> is molecular weight of the gas molecules. Using reference state calculations, this density for both ideal and van der Waals gas can be found from


&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
<math>\rho_0 = {P_0' M_g\over R T_0}</math>
<math>\rho_0 = {P_0' M_g\over R T_0}</math>


For example, air might have reference pressure of 1 atm = 0.101325 MPa, <math>M_g=28.97</math> g/mol at room temperature T<sub>0</sub>=300K with ''R'' = 8.3144621 J/k/mol leading to <math>\rho_0=0.1176</math> g/cm<sup>2</sup>. This calculation assumed an ideal gas (where <math>P_0'=P_0</math>). Calculations for density of a van der Waals gas differ only slight from density found by ideal gas law calculations.
For example, air might have reference pressure of 1 atm = 0.101325 MPa, <math>M_g=28.97</math> g/mol at room temperature ''T''<sub>0</sub>=300K with ''R'' = 8.3144621 J/k/mol leading to <math>\rho_0=0.001176</math> g/cm<sup>2</sup>. This calculation assumed an ideal gas (where <math>P_0'=P_0</math>). Calculations for density of a van der Waals gas differ only slight from density found by ideal gas law calculations.


== Isothermal and Adiabatic Modes ==
== Isothermal and Adiabatic Modes ==


When using [[Thermal Calculations#Thermodynamics Modes in MPM|isothermal mode]], this material models isothermal compression and expansion, which implies all work results in heating or cooling. The amount of heat generated is tracked in the particle's heat energy. The problem may include heat input (in thermal boundary conditions), which may cause temperature rises. In other words, this mode only means the gas itself will not cause temperature changes. An ideal gas is characterized buy no change in internal energy unless there is external external heating. A van der Waals gas, however, can change internal energy with a term proportional to <math>a'</math>.
When using [[Thermal Calculations#Thermodynamics Modes in MPM|isothermal mode]], this material models isothermal compression and expansion, which implies all work is converted to heat and expelled to the exterior. The amount of heat generated is tracked in the particle's heat energy. The problem may include heat input (in thermal boundary conditions), which may cause temperature rises. In other words, this mode only means the gas itself will not cause temperature changes. An ideal gas is characterized by no change in internal energy unless there is external external heating. A van der Waals gas, however, can change internal energy by a term proportional to <math>a'</math>.


To model adiabatic compression and expansion, activate [[Thermal Calculations#Thermodynamics Modes in MPM|adiabatic mode]]. This mode will convert work to heat resulting in heating during compression or cooling during expansion. You need to enter [[#Heat Capacity and Thermal Expansion Coefficient|heat capacity]] and enter thermal conductivity. The current implementation uses a temperature independent conductivity (which may change in the future). The calculations model both ideal gases and van der Waals gases and details are in the <tt>materials.pdf</tt> file in technical notes.
To model adiabatic compression and expansion, activate [[Thermal Calculations#Thermodynamics Modes in MPM|adiabatic mode]]. This mode will convert work to heat resulting in temperature increase during compression or decrease during expansion. These calculations need to define [[#Heat Capacity and Thermal Expansion Coefficient|heat capacity]] and enter thermal conductivity. The current implementation uses a temperature independent conductivity (which may change in the future). The calculations model both ideal gases and van der Waals gases and details are in the <tt>materials.pdf</tt> file in technical notes.


== Stability ==
== Stability ==
Line 92: Line 92:
! Property !! Description !! Units !! Default
! Property !! Description !! Units !! Default
|-
|-
| P0 || Reference pressure at reference temperature and reference density. When entered, this property must be a positive value greater than zero and the calculation track actual pressure. If this property is omitted, the reference pressure is set to 1 atmosphere and the code tracks gauge pressure. || [[ConsistentUnits Command#Legacy and Consistent Units|pressure units]] || Omitted
| P0 || Reference pressure at reference temperature and reference density. When entered, this property must be a positive value and the calculations will track actual pressure. If this property is omitted, the reference pressure is set to 1 atmosphere and the calculations will track gauge pressure. || [[ConsistentUnits Command#Legacy and Consistent Units|pressure units]] || Omitted
|-
|-
| T0 || Reference temperature || K || none
| T0 || Reference temperature || K || none
|-
|-
| rho || Density at reference conditions. ||  [[ConsistentUnits Command#Legacy and Consistent Units|density units]] || none
| rho || Density ain the initial particle configuration ||  [[ConsistentUnits Command#Legacy and Consistent Units|density units]] || none
|-
|-
| vdwa || Enter the van der Waals ''a'' property (setting this property sets code to use van der Waals gas law). The units are [[ConsistentUnits Command#Legacy and Consistent Units|(length units)]]<sup>6</sup>[[ConsistentUnits Command#Legacy and Consistent Units|(pressure units)]]/mole<sup>2</sup> || (see descriptio) || none
| vdwa || Enter the van der Waals ''a'' property (setting this property sets code to use van der Waals gas law). The units are [[ConsistentUnits Command#Legacy and Consistent Units|(length units)]]<sup>6</sup>[[ConsistentUnits Command#Legacy and Consistent Units|(pressure units)]]/mole<sup>2</sup> || (see descriptio) || none
Line 116: Line 116:
<math>C_v=\frac{nR}{(\gamma-1)\rho_0 V_0}</math>
<math>C_v=\frac{nR}{(\gamma-1)\rho_0 V_0}</math>


where <math>V_0/n</math> can be eliminated by [[#Reference State|reference state]] calculations and <math>\gamma=5/3</math> for a monoatomic gas or <math>\gamma=7/5</math> for a diatomic case. Thus, the material properties only need to indicate if the gas monoatomic or diatomic, and that is done with the <tt>Cv</tt> material property.
where <math>V_0/n</math> can be eliminated by [[#Reference State|reference state]] calculations and <math>\gamma=5/3</math> for a monoatomic gas or <math>\gamma=7/5</math> for a diatomic case. Thus, the material properties only need to indicate if the gas is monoatomic or diatomic, and that is done with the <tt>Cv</tt> material property.


Similarly, the volumetric thermal expansion coefficient can be explicitly calculated as
Similarly, the volumetric thermal expansion coefficient can be explicitly calculated as
Line 127: Line 127:
== History Variables ==
== History Variables ==


None
This material uses one history variable:
 
# J or the determinant of the deformation and equal to V/V<sub>0</sub>.


== Examples ==
== Examples ==


Note that you must always set the [[Thermal Calculations#Stress Free Temperature|stress free temperature]] when use ideal gas law for sample particles.
Note that you must always set the [[Thermal Calculations#Stress Free Temperature|stress free temperature]] when use ideal gas law for some particles.


  Material "air","Air","IdealGas"
  Material "air","Air","IdealGas"

Latest revision as of 13:00, 31 January 2023

Constitutive Laws

This MPM material models either an ideal gas or a non-ideal van der Waals gas. Note that MPM is not in ideal method for modeling gas dynamics. The main use of this material type is when combining gas material points with other material types. To optimize such modeling, the gas pressure can be tracked by one of two methods:

  1. Actual Pressure: Set reference pressure to [math]\displaystyle{ P_0 }[/math] and track total pressure, [math]\displaystyle{ P }[/math], on the each particle from gas laws.
  2. Gauge Pressure: Omitting reference pressure material property, P0, tells the calculation track a gauge pressure, [math]\displaystyle{ p = P - P_0 }[/math] where [math]\displaystyle{ P_0 }[/math] is the gauge pressure set to 1 atmosphere (= 0.101325 MPa), on each particle. In other words 1 atmosphere pressure is a new baseline that correspond to zero gauge pressure on the particle.

The "Actual Pressure" method works best when modeling just gas particles confined to a box by boundary conditions. The "Gauge Pressure" method appears to work better when gas particles are interacting with other materials (all of which have zero stress under starting conditions).

Ideal Gas Law

The ideal gas law is:

      [math]\displaystyle{ PV = nRT }[/math]

where P is pressure, V is volume, n is number of moles, R is the gas constant, and T is absolute temperture. By making use of a reference state, this equation is recast in a more convenient form for modeling as a hyperelastic material in MPM code. The resulting constitutive laws for pressure and gauge pressure are:

      [math]\displaystyle{ P = P_0 {T\over T_0} {1\over J} \quad{\rm and}\quad p = P_0 \left({T\over T_0} {1\over J}-1\right) }[/math]

where J is determinant of the deformation tensor (J = V/V0). P0, T0, and V0 (the initial particle value) define a gas reference state. Note that P0 is always 1 atmosphere when using gauge pressure.

The pressure is stored in the normal stresses or σxxyy = σzz = -P (or -p). All shear stresses are zero. This material is equivalent to a hyperelastic material with strain energy function of

      [math]\displaystyle{ P = -\frac{dW(J)}{dJ} \quad {\rm or}\quad W(J) = -P_0{T\over T_0} \ln J }[/math]

This energy function is equivalent to the energy per unit initial volume for isothermal compression or expansion of an ideal gas.

Non-Ideal van der Waals Gas

The van der Waals gas law is

     [math]\displaystyle{ \left(P + {an^2\over V^2}\right)\left({V\over n}-b\right) = RT }[/math]

where a and b are van der Waals gas properties. Using reference state calculations to eliminate n, actual and gauge pressure constitutive laws can be written as:

     [math]\displaystyle{ P = P_0'{T\over T_0}\left({1\over J-b'}\right) - {a'\over J^2} \quad{\rm and}\quad p = P_0'{T\over T_0}\left({1\over J-b'}\right) -\left(P_0 + {a'\over J^2}\right) }[/math]

where

     [math]\displaystyle{ a' = \frac{a\rho_0^2}{M_g},\ b'=\frac{b\rho_0}{M_g},\ {\rm and}\ P_0'=(P_0+a')(1-b') }[/math]

Note that these laws revert to ideal gas law when [math]\displaystyle{ a'=b'=0 }[/math]. The constant [math]\displaystyle{ b' }[/math] can also be written as [math]\displaystyle{ b'=bn/V_0 }[/math] which is a dimensionless value that corresponds to fraction of the reference volume that is occupied by gas molecules (an ideal gas ignores volume of the gas molecules).

Reference State

Gas material properties are set by defining a reference state with pressure, [math]\displaystyle{ P_0 }[/math], temperature, [math]\displaystyle{ T_0 }[/math], and initial particle volume, [math]\displaystyle{ V_0 }[/math]. When using gauge pressure method, [math]\displaystyle{ P_0 }[/math] is set to 1 atmosphere. The reference state is used eliminate number of moles in the gas law. For an ideal gas the analysis is easy:

     [math]\displaystyle{ n = \frac{P_0V_0}{RT_0} }[/math]

Substitution into ideal gas law gives the constitutive laws used in code. The calculation is the same for a van der Waals gas but is more complicated (it needs to solve a cubic equation for [math]\displaystyle{ V_0/n }[/math]). The details are provided in the materials.pdf file in the technical notes with final laws given above

Dynamic mechanical modeling in MPM coding needs know the gas density in the initial particle configuration. It is given, in general, by

     [math]\displaystyle{ \rho_0 = \frac{nM_g}{V_0} }[/math]

where [math]\displaystyle{ M_g }[/math] is molecular weight of the gas molecules. Using reference state calculations, this density for both ideal and van der Waals gas can be found from

     [math]\displaystyle{ \rho_0 = {P_0' M_g\over R T_0} }[/math]

For example, air might have reference pressure of 1 atm = 0.101325 MPa, [math]\displaystyle{ M_g=28.97 }[/math] g/mol at room temperature T0=300K with R = 8.3144621 J/k/mol leading to [math]\displaystyle{ \rho_0=0.001176 }[/math] g/cm2. This calculation assumed an ideal gas (where [math]\displaystyle{ P_0'=P_0 }[/math]). Calculations for density of a van der Waals gas differ only slight from density found by ideal gas law calculations.

Isothermal and Adiabatic Modes

When using isothermal mode, this material models isothermal compression and expansion, which implies all work is converted to heat and expelled to the exterior. The amount of heat generated is tracked in the particle's heat energy. The problem may include heat input (in thermal boundary conditions), which may cause temperature rises. In other words, this mode only means the gas itself will not cause temperature changes. An ideal gas is characterized by no change in internal energy unless there is external external heating. A van der Waals gas, however, can change internal energy by a term proportional to [math]\displaystyle{ a' }[/math].

To model adiabatic compression and expansion, activate adiabatic mode. This mode will convert work to heat resulting in temperature increase during compression or decrease during expansion. These calculations need to define heat capacity and enter thermal conductivity. The current implementation uses a temperature independent conductivity (which may change in the future). The calculations model both ideal gases and van der Waals gases and details are in the materials.pdf file in technical notes.

Stability

Ideal and van der Waals gas particles are fairly stable, but can be made unstable by certain boundary conditions on constraining walls. If stability problems arise, try different boundary conditions. They also do not work well for irreversibale processes such as free expansion into empty space (although can come close if using a very small CFL factor). This material model is intended to always be bounded by stable pressure conditions.

Material Properties

The ideal gas properties are set with

Property Description Units Default
P0 Reference pressure at reference temperature and reference density. When entered, this property must be a positive value and the calculations will track actual pressure. If this property is omitted, the reference pressure is set to 1 atmosphere and the calculations will track gauge pressure. pressure units Omitted
T0 Reference temperature K none
rho Density ain the initial particle configuration density units none
vdwa Enter the van der Waals a property (setting this property sets code to use van der Waals gas law). The units are (length units)6(pressure units)/mole2 (see descriptio) none
vdwb Enter the van der Waals b property (setting this property sets code to use van der Waals gas law). The units are (length units)3/mole (see description) none
Cv Instead of heat capacity, this parameter determines if the gas is monatomic or diatomic. Enter 1 (or any number smaller than 1) for monatomic or 2 (or any number larger than 2) for diatomic. The resulting heat capacity is described below none 1
(other) Properties common to all materials varies varies

When using gas particles, the stress free temperature must always be set to a desired temperature in Kelvin.

Heat Capacity and Thermal Expansion Coefficient

The material definitions for gases do not enter heat capacity or thermal expansion coefficient. Instead these properties are calculated from gas thermodynamics. A general results for heat capacity per unit mass is

     [math]\displaystyle{ C_v=\frac{nR}{(\gamma-1)\rho_0 V_0} }[/math]

where [math]\displaystyle{ V_0/n }[/math] can be eliminated by reference state calculations and [math]\displaystyle{ \gamma=5/3 }[/math] for a monoatomic gas or [math]\displaystyle{ \gamma=7/5 }[/math] for a diatomic case. Thus, the material properties only need to indicate if the gas is monoatomic or diatomic, and that is done with the Cv material property.

Similarly, the volumetric thermal expansion coefficient can be explicitly calculated as

     [math]\displaystyle{ \alpha_V = \frac{1}{T}\frac{\left(P+\frac{a'}{J^2}\right)(J-b')}{\left(JP-\frac{a'}{J}+\frac{2a'b'}{J^2}\right)} }[/math]

The details are in the materials.pdf technical notes. For an ideal gas, this result simplifies to [math]\displaystyle{ \alpha_V=1/T }[/math].

History Variables

This material uses one history variable:

  1. J or the determinant of the deformation and equal to V/V0.

Examples

Note that you must always set the stress free temperature when use ideal gas law for some particles.

Material "air","Air","IdealGas"
  P0 0.101325
  T0 300
  rho 0.001176
  Cv 2
Done
StressFreeTemp 300