# RD-E: 4300 Perfect Gas Modeling with Polynomial EOS

The purpose of this example is to plot numerical pressure, internal energy, and sound speed for a perfect gas material law.

Comparison to theoretical results is made. Control cards for Absolute and Relative formulations will be used.

Polynomial EOS is often used by Radioss to compute hydrodynamic pressure and used to model perfect gas. It is cubic in compression and linear in expansion.

$P={C}_{0}+{C}_{1}\mu +{C}_{2}{\mu }^{2}+{C}_{3}{\mu }^{3}+\left({C}_{4}+{C}_{5}\mu \right)E$

Where,

$E=\frac{{E}_{\mathrm{int}}}{{V}_{0}}$

and

$\mu =\frac{\rho }{{\rho }_{0}}-1$

A simple test of compression/expansion is made to compare these formulation outputs with theoretical results.

## Input Files

Before you begin, copy the file(s) used in this example to your working directory.

## Model Description

This test consists with an elementary volume of perfect gas undergoing spherical expansion and compression.
Initial conditions are:
• ${P}_{0}=1e5\left[\mathrm{Pa}\right]$
• ${V}_{0}=1000\left[{m}^{3}\right]$
• ${\rho }_{0}=1.204\left[\frac{kg}{{m}^{3}}\right]$
• ${\mu }_{0}=0$

The fluid will be assumed to be a perfect gas. Volume is changed in the three directions to consider a pure compression $-1<\mu <0$ followed by an expansion of matter $\mu >0$ (Figure 3).

This test will be modeled with a single ALE element (8 node brick) and polynomial EOS.

Evolutions of pressure, internal energy and sound speed will be compared between numerical output and theoretical results.

The length is modified with /IMPDISP; its influences on $V$ and $\mu$ are plotted (Figure 3).

### Simulation Iterations

A single ALE brick element is used. Material is confined inside the element by defining brick nodes as Lagrangian. For each face, displacement is imposed on the four nodes along the normal.

### Polynomial EOS

Polynomial EOS is used in /EOS/POLYNOMIAL to compute hydrodynamic pressure. It is cubic in compression and linear in expansion.

$P={C}_{0}+{C}_{1}\mu +{C}_{2}{\mu }^{2}+{C}_{3}{\mu }^{3}+\left({C}_{4}+{C}_{5}\mu \right)E$

C parameters are called hydrodynamic coefficients and they are input parameters. Hypothesis on the material behavior allows determining of these coefficients:
• Incompressible gas
• Linear elastic material
• Perfect gas

This example is focused only on Perfect Gas modeling.

## Results

### Theoretical Results

The purpose of this section is to plot pressure, internal energy, and sound speed in function of the single parameter $V$ or $\mu$ .
1. Pressure:

Perfect gas pressure is given by:

$PV=\left(\gamma -1\right){E}_{\mathrm{int}}$

Then,

$dP\left(V,{E}_{\mathrm{int}}\right)={\frac{\partial P}{\partial V}|}_{{E}_{\mathrm{int}}}dV+{\frac{\partial P}{\partial {E}_{\mathrm{int}}}|}_{V}d{E}_{\mathrm{int}}$

Radioss assumes the hypothesis of an isentropic process to compute the change in internal energy:

$d{E}_{\mathrm{int}}=-PdV$

This theory gives the following differential equation:

$\frac{dP}{dV}=-\frac{\gamma P}{V}$

This has the form $y\text{'}+\frac{\gamma }{x}=0$ and the general solution is:

$y=Cst.{x}^{-\gamma }$

Pressure is also polytropic:

$P{V}^{\gamma }={P}_{0}{V}_{0}{}^{\gamma }$
$P\left(V\right)={P}_{0}{\left(\frac{{V}_{0}}{V}\right)}^{\gamma }$

Here, $\gamma$ is the material constant (ratio of heat capacity). For diatomic gas $\gamma$ =1.4. Air is made mainly of diatomic gas, so set gamma to 1.4 for air.

2. Internal Energy:

Equation 5 and Equation 11 lead to the immediate result:

${E}_{\mathrm{int}}\left(V\right)=\frac{{P}_{0}{V}_{0}{}^{\gamma }}{\left(\gamma -1\right){V}^{\gamma -1}}$

3. Sound Speed:

Perfect gas sound speed is:

$c=\sqrt{\frac{\gamma P}{\rho }}$

Equation 11 gives its expression in term of volume:

$c=\frac{\gamma P{}_{0}}{{\rho }_{0}}{\left(\frac{{V}_{0}}{V}\right)}^{\gamma -1}$

Pressure, internal energy, and sound speed are expressed both in function of $V$ and $\mu$ .
Table 1. Theoretical Results
Pressure (Pa) Internal Energy Density (J) Sound Speed (m/s)
${P}^{REF}\left(V\right)$ ${P}^{REF}\left(\mu \right)$ $\rho {\text{e}}^{REF}\left(V\right)$ $\rho {\text{e}}^{REF}\left(\mu \right)$ ${c}^{REF}\left(V\right)$ ${c}^{REF}\left(\mu \right)$
${P}_{0}{\left(\frac{{V}_{0}}{V}\right)}^{\gamma }$ ${P}_{0}{\left(1+\mu \right)}^{\gamma }$ $\frac{{P}_{0}}{\left(\gamma -1\right)}{\left(\frac{{V}_{0}}{V}\right)}^{\gamma -1}$ $\frac{{P}_{0}}{\left(\gamma -1\right)}{\left(1+\mu \right)}^{\gamma -1}$ $\sqrt{\frac{\gamma {P}_{0}}{{\rho }_{0}}{\left(\frac{{V}_{0}}{V}\right)}^{\gamma -1}}$ $\sqrt{\frac{\gamma {P}_{0}}{{\rho }_{0}}{\left(1+\mu \right)}^{\gamma -1}}$
Corresponding plots are:

### Material Control Cards

/MAT/LAW6 (HYDRO or HYD_VISC) and /EOS/POLYNOMIAL use this equation to compute hydrostatic pressure. It is possible to consider absolute values or relative variation. Material is supposed to be a perfect gas. The following cases have been investigated.
Table 2. Modeling formulation for perfect gas
Case Mathematical Model Pressure Energy
1 $P\left(\mu ,E\right)$ absolute absolute
2 $\text{Δ}P\left(\mu ,E\right)$ relative absolute
3 $\text{Δ}P\left(\mu ,\text{Δ}E\right)$ relative relative
4 $P\left(\mu ,\text{Δ}E\right)$ absolute relative

### Sound Speed and Time Step

Material LAW6 computes sound speed through the usual expression for fluids:

${c}^{2}=\frac{dP}{d\rho }$

It can be written in function of $\mu$ :

$\mu =\frac{\rho }{{\rho }_{0}}-1⇒\frac{1}{d\rho }=\frac{1}{{\rho }_{0}}\frac{1}{d\mu }$

Then,

${c}^{2}=\frac{1}{{\rho }_{0}}\frac{dP}{d\mu }$

The total differential of $P$ in terms of internal energy $E$ and $\mu$ is:

$dP\left(\mu ,E\right)={\frac{\partial P}{\partial \mu }|}_{E}\text{\hspace{0.17em}}d\mu +{\frac{\partial P}{\partial E}|}_{\mu }dE$

In case of an isentropic transformation (reversible and adiabatic), the change of internal energy ${E}_{\mathrm{int}}$ with volume $V$ and pressure $P$ is given by:

$d{E}_{\mathrm{int}}=-PdV$

Using relation which links ${E}_{\mathrm{int}}$ and $E$ leads to:

$dE=-\frac{P}{{V}_{0}}dV$

$\mu$ can be expressed in terms of volume ratio:

$\mu =\frac{{v}_{0}}{v}-1$

Its variation in function of the volume change is also:

$d\mu =-\frac{{V}_{0}}{{V}^{2}}dV=-\frac{{\left(1+\mu \right)}^{2}}{{V}_{0}}dV$

Change in internal energy per unit volume $E$ is then:

$dE=-\frac{P}{{\left(1+\mu \right)}^{2}}d\mu$
$\frac{dP\left(\mu ,E\right)}{d\mu }={\frac{\partial P}{\partial \mu }|}_{E}+\frac{P}{{\left(1+\mu \right)}^{2}}{\frac{\partial P}{\partial E}|}_{\mu }$

Finally, the sound speed is given by:

${c}^{2}=\frac{1}{{\rho }_{0}}{\frac{\partial P}{\partial \mu }|}_{E}+\frac{P}{{\rho }_{0}{\left(1+\mu \right)}^{2}}{\frac{\partial P}{\partial E}|}_{\mu }$

This expression computes the sound speed for a given equation of state $P\left(\mu ,E\right)$ . In the case of perfect gas, it was shown that for each type of formulation (absolute or relative), EOS can be written:

$P\left(\mu ,E\right)={C}_{0}+{C}_{1}\mu +\left({C}_{4}+{C}_{5}\mu \right)E$

Equation 25 is used to compute sound speed:

${\frac{\partial P}{\partial \mu }|}_{E}={C}_{1}+{C}_{5}E$
${\frac{\partial P}{\partial E}|}_{\mu }={C}_{4}+{C}_{5}\mu$
${c}^{2}={\frac{{C}_{1}+{C}_{5}E}{\rho 0}}_{}+\frac{{C}_{0}+{C}_{1}\mu +\left({C}_{4}+{C}_{5}\mu \right)E}{{\rho }_{0}{\left(1+\mu \right)}^{2}}\left({C}_{4}+{C}_{5}\mu \right)$

This calculation is then applied for each of the four cases.
Table 3. Numerical Sound Speed versus Theoretical Expression
Case C0 C1 C4 C5 c2

From Equation 25

Comparison with Theoretical Value
1 0 0 $\gamma -1$ $\gamma -1$ $\frac{\gamma \left(\gamma -1\right)E}{{\rho }_{0}}$ $c={c}^{REF}$
2 0 0 $\gamma -1$ $\gamma -1$ $\frac{\gamma \left(\gamma -1\right)E}{{\rho }_{0}}$ $c={c}^{REF}$
3 ${E}_{0}\left(\gamma -1\right)$ ${E}_{0}\left(\gamma -1\right)$ $\gamma -1$ $\gamma -1$ $\frac{\gamma \left(\gamma -1\right)\left(E+{E}_{0}\right)}{{\rho }_{0}}$ $c={c}^{REF}$
4 ${E}_{0}\left(\gamma -1\right)$ ${E}_{0}\left(\gamma -1\right)$ $\gamma -1$ $\gamma -1$ $\frac{\gamma \left(\gamma -1\right)\left(E+{E}_{0}\right)}{{\rho }_{0}}$ $c={c}^{REF}$

For each of the four formulations, the computed sound speed by Radioss is the same as the theoretical one. Time step and cycle number are also not affected.

### Case 1: Both Pressure and Energy are Absolute Values

1. Pressure:

Equation of State:

$P=\left(\gamma -1\right)\frac{{E}_{\mathrm{int}}}{V}=\left(\gamma -1\right)\left(1+\mu \right)\frac{{E}_{\mathrm{int}}}{{V}_{0}}$

Where, ${{E}_{\mathrm{int}}|}_{t=0}={E}_{0}{V}_{0}=\frac{{P}_{0}{V}_{0}}{\gamma -1}$

Identifying the polynomial coefficients leads to:

$P=\left({C}_{4}+{C}_{5}\mu \right)E$

Where, ${C}_{4}=C{}_{5}\text{\hspace{0.17em}}=\left(\gamma -1\right);\text{ }{E}_{0}=\frac{{P}_{0}}{\gamma -1};\text{ }{P}_{sh}=0$

2. Corresponding Input:
#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|
/MAT/HYD_VISC/1
Polynomial EOS-Absolute Pressure-Absolute Energy
#              RHO_I               RHO_0
1.204                   0
#                Knu                Pmin
0                   0
/EOS/POLYNOMIAL/1
Polynomial EOS-Absolute Pressure-Absolute Energy
#                 C0                  C1                  C2                  C3
0                   0                   0                   0
#                 C4                  C5                  E0                 Psh               RHO_0
.4                  .4              250000                   0               1.204
#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|
3. Output Results:
Table 4.
Time History Measure Initial Value Unit
/TH/BRICK ( $P$ ) $P$ ${P}_{0}$ Pressure
/TH (IE) ${E}_{\mathrm{int}}\left(=E\cdot {V}_{0}\right)$ ${E}_{0}{V}_{0}$ Energy
/TH/BRICK (IE) ${E}_{\mathrm{int}}/V$ ${E}_{0}$ Pressure
4. Comparison with Theoretical Result:
Numerical result for perfect gas pressure is given by time history. Element time history (/TH/BRICK) allows displaying it. This result is compared to a theoretical one. Curves are superimposed.
Internal energy can be obtained through two different ways. The first one is internal energy density ( ${E}_{\mathrm{int}}/V$ ) recorded by element time history (/TH/BRICK). The second one is the internal energy from the global time history ${\sum }_{element}{E}_{\mathrm{int}}$ because the model is composed of a single element.

### Case 2: Pressure is Relative and Energy is Absolute

1. Pressure:

Equation of State:

$P\left(\mu ,E\right)=\left(\gamma -1\right)\left(1+\mu \right)\frac{{E}_{\mathrm{int}}}{{V}_{0}}$

Relative Pressure:

$\text{Δ}P=P\left(\mu ,E\right)-{P}_{0}=\left(\gamma -1\right)\left(1+\mu \right)\frac{{E}_{\mathrm{int}}}{{V}_{0}}-{P}_{0}$

Identifying with polynomial coefficients leads to:

$\text{Δ}P=P={P}_{sh}=-{P}_{sh}+\left({C}_{4}+{C}_{5}\mu \right)E$

Where, ${C}_{4}=C{}_{5}\text{\hspace{0.17em}}=\left(\gamma -1\right);\text{ }{E}_{0}=\frac{{P}_{0}}{\gamma -1};\text{ }{P}_{sh}=0$

Minimum Pressure:

${P}_{\mathrm{min}}=-{P}_{0}$

Due to $P>0⇒\text{Δ}P\ge -{P}_{0}$ , the minimum pressure must be set to a non-zero value.

2. Corresponding Input:
#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|
/MAT/HYD_VISC/1
Polynomial EOS-Relative Pressure-Absolute Energy
#              RHO_I               RHO_0
1.204                   0
#                Knu                Pmin
1.5256E-5             -100000
/EOS/POLYNOMIAL/1
Polynomial EOS-Relative Pressure-Absolute Energy
#                 C0                  C1                  C2                  C3
0                   0                   0                   0
#                 C4                  C5                  E0                 Psh               RHO_0
.4                  .4              250000              100000               1.204
#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|
3. Output Result:
Time History Measure Initial Value Unit
/TH/BRICK ( $P$ ) $\text{Δ}P$ 0 Pressure
/TH (IE) ${E}_{\mathrm{int}}\left(=E\cdot {V}_{0}\right)$ ${E}_{0}{V}_{0}$ Energy
/TH/BRICK (IE) ${E}_{\mathrm{int}}/V$ ${E}_{0}$ Pressure
4. Comparison with Theoretical Result:

Numerical result for perfect gas pressure is given by time history. Element time history (/TH/BRICK) allows displaying it. This result is compared to a theoretical one. Curves are superimposed.

Element time history (/TH/BRICK) is the pressure relative to Psh. The resulting curve is then shifted with Psh value and starts from 0.
Internal energy can be obtained through two different ways. The first one is internal energy density ( ${E}_{\mathrm{int}}/V$ ) recorded by element time history (/TH/BRICK). The second one is the internal energy from the global time history ${\sum }_{element}{E}_{\mathrm{int}}$ because the model is composed of a single element.

### Case 3: Both Pressure and Energy are Relative

1. Pressure:

Equation of State:

$P=\left(\gamma -1\right)\left(1+\mu \right)\frac{{E}_{\mathrm{int}}}{{V}_{0}}$

Initial internal energy can be introduced:

${E}_{\mathrm{int}}={E}_{\mathrm{int}}+\left({{E}_{\mathrm{int}}|}_{t=0}-{{E}_{\mathrm{int}}|}_{t=0}\right)$

Pressure from a reference one provides:

$P-{P}_{0}=\text{Δ}P=\left(\gamma -1\right)\left(1+\mu \right)\left(\text{Δ}E+{E}_{0}\right)-{P}_{0}$

Where, $\text{Δ}E=\frac{{E}_{\mathrm{int}}-{{E}_{\mathrm{int}}|}_{t=0}}{{V}_{0}};\text{\hspace{0.17em}}{E}_{0}=\frac{{{E}_{\mathrm{int}}|}_{t=0}}{{V}_{0}}$ .

Identifying with polynomial coefficients leads to:

$\text{Δ}P=P-{P}_{sh}={C}_{0}+{C}_{1}\mu +\left({C}_{4}+{C}_{5}\mu \right)\text{Δ}E-{P}_{sh}$

Where, ${C}_{0}={C}_{1}={E}_{0}\left(\gamma -1\right)$ , ${C}_{4}={C}_{5}=\gamma -1$ , $\text{Δ}{E}_{0}=0$ and ${P}_{sh}={P}_{0}$ .

Minimum Pressure:

${P}_{\mathrm{min}}=-{P}_{0}$

Due to $P\ge 0⇒\text{Δ}P\ge -{P}_{0}$ , the minimum pressure must be set to a non-zero value.

2. Corresponding Input:
#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|
/MAT/HYD_VISC/1
Polynomial EOS-Relative Pressure-Absolute Energy
#              RHO_I               RHO_0
1.204                   0
#                Knu                Pmin
1.5256E-5             -100000
/EOS/POLYNOMIAL/1
Polynomial EOS-Relative Pressure-Absolute Energy
#                 C0                  C1                  C2                  C3
100000              100000                   0                   0
#                 C4                  C5                  E0                 Psh               RHO_0
.4                  .4                   0              100000               1.204
#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|
3. Output Results:
Time History Measure Initial Value Unit
/TH/BRICK ( $P$ ) $\text{Δ}P$ 0 Pressure
/TH (IE) ${E}_{\mathrm{int}}\left(=\text{Δ}E\cdot {V}_{0}\right)$ 0 Energy
/TH/BRICK (IE) $\text{Δ}{E}_{\mathrm{int}}/V$ 0 Pressure
4. Comparison with Theoretical Result:

Numerical result for perfect gas pressure is given by time history. Element time history (/TH/BRICK) allows displaying it. This result is compared to a theoretical one. Curves are superimposed.

Element time history (/TH/BRICK) is the pressure relative to Psh. The resulting curve is then shifted with Psh value and starts also from 0.
Internal energy can be obtained through two different ways. The first one is internal energy density ( ${E}_{\mathrm{int}}/V$ ) recorded by element time history (/TH/BRICK). The second one is the internal energy from the global time history ${\sum }_{element}{E}_{\mathrm{int}}$ because the model is composed of a single element. This numerical internal energy is relative to its initial value; it is shifted with the ${E}_{0}{V}_{0}$ value from the absolute theoretical one and also starts from 0.

### Case 4: Pressure is Absolute and Energy is Relative

1. Pressure:

Equation of State:

$P=\left(\gamma -1\right)\left(1+\mu \right)\frac{{E}_{\mathrm{int}}}{{V}_{0}}$

Initial internal energy can be introduced:

${E}_{\mathrm{int}}={E}_{\mathrm{int}}+\left({{E}_{\mathrm{int}}|}_{t=0}-{{E}_{\mathrm{int}}|}_{t=0}\right)$

Pressure from a reference provided:

$P=\left(\gamma -1\right)\left(1+\mu \right)\left(\text{Δ}E+{E}_{0}\right)$

Identifying with polynomial coefficients leads to:

$P={C}_{0}+{C}_{1}\mu +\left({C}_{4}+{C}_{5}\mu \right)\text{Δ}E$

Where, ${C}_{0}={C}_{1}={E}_{0}\left(\gamma -1\right)$ ; ${C}_{4}={C}_{5}=\gamma -1$

2. Corresponding Input:
#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|
/MAT/HYD_VISC/1
Polynomial EOS-Relative Pressure-Absolute Energy
#              RHO_I               RHO_0
1.204                   0
#                Knu                Pmin
1.5256E-5                   0
/EOS/POLYNOMIAL/1
Polynomial EOS-Relative Pressure-Absolute Energy
#                 C0                  C1                  C2                  C3
100000              100000                   0                   0
#                 C4                  C5                  E0                 Psh               RHO_0
.4                  .4                   0                   0               1.204
#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|
3. Output Results:
Time History Measure Initial Value Unit
/TH/BRICK ( $P$ ) $P$ ${P}_{0}$ Pressure
/TH (IE) ${E}_{\mathrm{int}}\left(=\text{Δ}E\cdot {V}_{0}\right)$ 0 Energy
/TH/BRICK (IE) $\text{Δ}{E}_{\mathrm{int}}/V$ 0 Pressure
4. Comparison with Theoretical Result:
Element time history (/TH/BRICK) gives absolute pressure. This result is compared to a theoretical one. Curves are superimposed.
Internal energy can be obtained through two different ways. The first one is internal energy density ( $\text{Δ}{E}_{\mathrm{int}}/V$ ) recorded by element time history (/TH/BRICK). The second one is the internal energy from the global time history ${\sum }_{element}{E}_{\mathrm{int}}$ because the model is composed of a single element. This numerical internal energy is relative to its initial value; it is shifted with the ${E}_{0}{V}_{0}$ value from the absolute theoretical one and also starts from 0.