SpectraSim Documentation
Parameter · 04 Material

Density reference

material.ambient.density_reference Step 04 · Material

The absolute pressure at which the constant density of an incompressible run is evaluated: the operating pressure, i.e. the outlets' absolute pressure (default), or the estimated mean pressure inside the muffler, taken from the previous run of the same case.

Last updated

Theory

An incompressible solution uses one density everywhere, computed from the ideal-gas law at the material temperature. The gas leaves through the outlets at their absolute pressure pop=patm+pˉg,outp_{op} = p_{atm} + \bar p_{g,out} (the mean of the outlets' gauge pressures), and upstream it is higher by up to the static pressure drop. Files of older versions used the ambient pressure here; the two are the same when the outlets are at 0 Pa gauge.

"Mean" evaluates the density at popp_{op} plus half the static pressure drop Δps\Delta p_s, a first estimate of the mean absolute pressure between inlet and outlet. Δps\Delta p_s is read from the last completed run in this run folder (last_run_dp.json); if there is none, the program uses the outlet pressure and states this ("No previous run, using the outlet pressure for this run.").

The reference is the last result of the run folder itself: after a change of flow rate it is out of date until the case has been run again. The density with which each run was built is recorded with the run, so its results are always converted with that density.

The compressible solver computes the density itself from the solved pressure and temperature; this setting does not affect it.

Equations

ρ=(patm+pg) MR T,pg=pˉg,out (outlet pressure),pg=pˉg,out+12Δps (mean)\rho = \frac{(p_{atm} + p_{g})\,M}{\mathcal{R}\,T}, \qquad p_g = \bar p_{g,out}\ \text{(outlet pressure)}, \qquad p_g = \bar p_{g,out} + \tfrac{1}{2}\Delta p_s\ \text{(mean)}
(1)
wheremeaningunit
ρ\rhoDensity of the incompressible runkg/m³
patmp_{atm}Ambient (atmospheric) pressurePa
pgp_gGauge pressure the density is evaluated atPa
pˉg,out\bar p_{g,out}Mean gauge pressure of the outletsPa
Δps\Delta p_sStatic pressure drop of the previous runPa
MMMolar mass of the gaskg/kmol
R\mathcal{R}Universal gas constant, 8314.47J/(kmol K)
TTMaterial temperatureK
ερ=∣Δps∣patm\varepsilon_\rho = \frac{\lvert\Delta p_s\rvert}{p_{atm}}
(2)
wheremeaningunit
ερ\varepsilon_\rhoDensity-variation indicator of quality gate 2 (incompressible runs)-

Default and rule

Default
outlet pressure (density at the operating pressure)
Rule

Outlet pressure.

Source

A rule of the program. Quality gate 2 evaluates equation (2): above 5 % it warns that the constant-density assumption begins to bias the result; above 15 % it fails and recommends the compressible solver. These limits are the program's own choice; they are not taken from a published source.

Valid range outlet pressure | mean

Choices

Outlet pressure: patm+pˉg,outp_{atm} + \bar p_{g,out}. Mean: that plus Δps/2\Delta p_s/2 from the last completed run of this case. To keep a density computed by an older version, type it as a manual density (Density).

Large pressure drop

When the static pressure drop exceeds a few per cent of the ambient pressure, "mean" is closer to the actual density than "outlet pressure"; above 15 % neither is adequate and the compressible solver should be used.

Out-of-date reference

"Mean" uses the pressure drop of the previous run; after changing the flow rate, run the case once more for a consistent density.