---
title: 'CGSim: Two-Fluid Cold Gas Subgrid Model'
url: https://www.emergentmind.com/topics/cgsim
type: topic
---

# CGSim: Two-Fluid Cold Gas Subgrid Model

Searching arXiv for the cited papers to ground the article.
CGSim most explicitly denotes the **Cold Gas Subgrid Model (CGSM)**, a two-fluid subgrid framework for modeling unresolved cold circumgalactic medium (CGM) gas in galaxy simulations. In that formulation, the cold phase at $\sim 10^4\,{\rm K}$ is represented not as resolved clumps but as a co-spatial subgrid fluid coupled to the ordinary hydrodynamic gas through mass, momentum, and energy exchange. The framework is motivated by the severe scale separation between galactic halos and the sub-pc to pc cloudlet scales that govern cold-gas survival, destruction, and condensation, and it is intended to recover the qualitative behavior of unresolved cold CGM physics more faithfully than standard underresolved hydrodynamics [2402.03419].

## 1. Definition and terminological scope

Within the supplied literature, CGSim refers most directly to the **CGSM / CGSim concept**: a **two-fluid subgrid model for unresolved cold CGM gas**. The model evolves the normal resolved gas with hydrodynamics and a subgrid cold phase by tracking its **total mass density** and **bulk momentum**, while deriving unresolved cloudlet properties from the resolved phase under pressure equilibrium and a cooling-length-based cloud-size prescription [2402.03419].

A central point is that CGSim in this sense is **not** a particle-based cloud tracker and **not** a direct high-resolution simulation of individual cold structures. The model explicitly does **not** track individual clouds. Instead, it evolves the **cell-averaged mass density of all unresolved cold gas in a cell**, denoted $\bar{\rho}_{\rm cl}$, together with the bulk velocity ${\bf \bar{v}_{\rm cl}}$ of that unresolved component. This distinction matters because the framework is designed to represent an unresolved multiphase medium statistically rather than geometrically.

The term can also be confused with unrelated simulation frameworks in other subfields. In geostatistics, **CCWSIM** is a **wavelet-accelerated extension of CCSIM** for categorical multiple-point geostatistical simulation; it is described as being in the same family as CCSIM and MS-CCSIM and is **not a separate CGSim implementation** [2404.00441]. In graphics hardware, **3DGauCIM** concerns acceleration of static and dynamic 3D Gaussian splatting on edge devices and is relevant only in the broader sense of simulation/rendering acceleration rather than as a cold-gas CGSim framework [2507.19133]. This suggests that, in astrophysical usage, CGSim is best interpreted as shorthand for the CGSM-style cold-gas subgrid approach.

## 2. Astrophysical motivation and scale separation

The core motivation for CGSim is that cold CGM gas is both astrophysically important and numerically underresolved. The cold component of the CGM is described as a major reservoir in the galactic baryon cycle: it can be **accreted** onto galaxies and fuel star formation, **ejected** in winds, and **mix** with hot halo gas. The supplied account states that cold gas is seen around dwarf, $L_\ast$, and massive galaxies, and may account for $\gtrsim 25\%$ of baryons in $L_\ast$ galaxies and up to $\sim 90\%$ in dwarfs [2402.03419].

The numerical obstacle is the mismatch between physically relevant cold-cloud scales and practical halo-resolution scales. The characteristic size of cold CGM cloudlets is estimated to be **$\sim 0.1 - 10$ pc**, with observations suggesting structures perhaps as small as **$\sim 10-100$ pc or below**, whereas galaxy-scale cosmological simulations typically resolve the CGM only to **$\sim 100$ pc to kpc scales**. The paper further notes that resolving an $L_\ast$ halo out to $\sim 200$ kpc at parsec resolution would require **$\sim 10$ million times more voxels** than state-of-the-art cosmological runs [2402.03419].

Standard underresolved hydrodynamics then produces specific pathologies. Cold clouds become artificially **one-cell objects**; their sizes are set by the grid rather than by the underlying microphysics; cloud destruction and growth times become too long; and the spatial distribution of cold gas becomes qualitatively wrong. CGSim is introduced precisely to avoid forcing all thermodynamic complexity into a single resolved thermal phase when the relevant cold structures are far below the grid scale.

## 3. Two-fluid formulation

CGSim treats the gas as two coupled components: a **resolved “hot” gas fluid** and an **unresolved cold gas fluid**. The resolved fluid is the standard hydrodynamic gas, characterized by density $\rho_g$, velocity ${\bf v}_g$, energy density $\varepsilon_g$, and pressure $P_g$. In the uncoupled presentation, its equations are written as
\[
\frac{\partial \rho_g}{\partial t} + \nabla \cdot (\rho_g {\bf v}_g) = 0,
\]
\[
\frac{\partial(\rho_g {\bf v}_g)}{\partial t} + \nabla \cdot (\rho_g{\bf v}_g {\bf v}_g^T + {\bf I}P_g) = -\rho_g \nabla {\bf \Phi},
\]
\[
\frac{\partial \varepsilon_g}{\partial t} + \nabla\cdot ({\bf v}_g \varepsilon_g) = - P_g\nabla\cdot{\bf v}_g + S_g.
\]

The cold phase represents **unresolved cold cloudlets** embedded in the hot medium. Three assumptions organize the closure. First, the cloudlets satisfy $r_{\rm cl} \ll \Delta x_{\rm cell}$. Second, the cold phase is effectively **pressureless as a bulk fluid** on resolved scales. Third, it is assigned a fixed temperature, usually
\[
T_{\rm cl} = 10^4\,{\rm K}.
\]

The dynamically evolved cold-fluid variables are the **total mass density** $\bar{\rho}_{\rm cl}$ and the **bulk velocity** ${\bf \bar{v}_{\rm cl}}$. The quantity $\bar{\rho}_{\rm cl}$ is explicitly **not** the physical density inside an individual cloudlet; it is the **cell-averaged mass density of all unresolved cold gas in that cell**. This choice separates macroscopic transport from unresolved internal cloud structure and allows partial cold mass fractions within a single resolution element.

## 4. Derived cloudlet properties and exchange operators

The unresolved cloudlets are not evolved individually; their physical properties are inferred from the resolved hot phase. The construction assumes **thermal pressure equilibrium between phases**, so the cold cloudlet density is set by the hot-cell pressure and the assumed cold temperature. The cloudlet radius follows the “mist” picture of CGM cold gas,
\[
r_{\rm cl} \approx c_s t_{\rm cool},
\]
evaluated at the cooling-function peak temperature $T_{\rm cool, peak} \approx 10^{4.3}\,\mathrm{K}$:
\[
r_{\rm cl} = (c_s t_{\rm cool})\big|_{T_{\rm cool, peak}}.
\]
Here
\[
c_s = \sqrt{\gamma P_g / \rho_g},
\]
and $t_{\rm cool}$ is determined from the resolved thermodynamic state and the radiative cooling rate. Once $r_{\rm cl}$ is known, a characteristic cloudlet mass is assigned through
\[
m_{\rm cl} = \frac{4}{3}\pi r_{\rm cl}^3 \rho_{\rm cl},
\]
and the number of unresolved cloudlets in a cell is obtained from the total cold mass via
\[
N_{\rm cl} = \frac{M_{\rm cl}}{m_{\rm cl}}.
\]

The coupled mass equations are written as
\[
\frac{\partial \rho_g}{\partial t} + \nabla \cdot (\rho_g {\bf v}_g) = -\dot{\rho}_{\rm mix},
\]
\[
\frac{\partial \bar{\rho}_{\rm cl}}{\partial t} + \nabla \cdot (\bar{\rho}_{\rm cl} {\bf \bar{v}_{\rm cl}}) = \dot{\rho}_{\rm mix}.
\]
A positive $\dot{\rho}_{\rm mix}$ transfers mass from hot to cold; a negative value transfers mass from cold to hot.

The momentum equations add both mixing and drag:
\[
\frac{\partial(\rho_g {\bf v}_g)}{\partial t} + \nabla \cdot (\rho_g{\bf v}_g{\bf v}_g^T + {\bf I}P_g) = -\rho_g \nabla {\bf \Phi} - \dot{\bf p}_{\rm mix} - \dot{\bf p}_{\rm drag},
\]
\[
\frac{\partial(\bar{\rho}_{\rm cl} {\bf \bar{v}_{\rm cl}})}{\partial t} + \nabla \cdot (\bar{\rho}_{\rm cl}{\bf \bar{v}_{\rm cl}{\bf \bar{v}_{\rm cl}^T}) = -\bar{\rho}_{\rm cl} \nabla {\bf \Phi} + \dot{\bf p}_{\rm mix} + \dot{\bf p}_{\rm drag}.
\]
The mixing momentum term assigns donor-phase momentum to transferred mass:
\[
\dot{\bf p}_{\rm mix} =
\begin{cases}
\dot{\rho}_{\rm mix}{\bf v}_g, & \dot{\rho}_{\rm mix} > 0, \\
\dot{\rho}_{\rm mix}{\bf \bar{v}_{\rm cl}}, & \dot{\rho}_{\rm mix} < 0.
\end{cases}
\]
The drag term is
\[
\dot{\bf p}_{\rm drag} = K_{\rm drag}{\bf v}_{\rm rel},
\qquad
{\bf v}_{\rm rel} = {\bf v}_g - {\bf \bar{v}_{\rm cl}},
\]
with
\[
K_{\rm drag} = \pi r_{\rm cl}^2 \rho_g \frac{\rho_{\rm cl}}{m_{\rm cl}}.
\]

Because the cold phase is kept at fixed $T_{\rm cl}$, its internal energy is not separately evolved. The hot-phase energy equation becomes
\[
\frac{\partial \varepsilon_g}{\partial t} + \nabla\cdot ({\bf v}_g \varepsilon_g) = - P_g\nabla\cdot{\bf v}_g + S_g - \dot{\varepsilon}_{\rm mix} - \dot{\varepsilon}_{\rm drag},
\]
with
\[
\dot{\varepsilon}_{\rm mix} = \dot{\rho}_{\rm mix}(\varepsilon_g / \rho_g),
\qquad
\dot{\varepsilon}_{\rm drag} = K_{\rm drag} {\bf v}_{\rm rel}^2.
\]
In physical terms, mixing removes thermal energy from the hot phase, while drag converts relative bulk motion into heat.

## 5. Thermal instability, cloud crushing, and timestep control

CGSim includes two explicit exchange channels: **thermal instability** and **cloud crushing / cloud-wind interactions**. Thermal instability is implemented by identifying cells that satisfy three conditions at a timestep: $10^4\,{\rm K} \le T \le 10^6\,{\rm K}$, $\Delta x_{\rm cell} > r_{\rm cl}$, and radiative cooling would reduce the cell’s energy, $\Delta E_{\rm cool}<0$ [2402.03419]. If these conditions are not met, the cell cools or heats normally.

When the instability criteria are satisfied, the model converts the energy that would be radiated away into cold-gas mass while conserving energy:
\[
\rho_g e_g + \bar{\rho}_{\rm cl}e_{\rm cl} - |\Delta E_{\rm cool}| = (\rho_g - \Delta \rho_{\rm mix, TI})e_g + (\bar{\rho}_{\rm cl} + \Delta \rho_{\rm mix, TI})e_{\rm cl}.
\]
Solving for the mass transfer yields
\[
\Delta \rho_{\rm mix, TI} = \frac{|\Delta E_{\rm cool}|}{e_g - e_{\rm cl}}.
\]
Since $e_g > e_{\rm cl}$, the transfer is positive and thermal instability moves mass only from hot to cold.

The second exchange channel adopts a cloud-crushing prescription from Fielding et al. (2022):
\[
\dot{\rho}_{\rm mix, cc} = 0.6 \bigg( \frac{\bar{\rho}_{\rm cl} {\bf v}_{\rm rel}}{\chi^{1/2} r_{\rm cl}}\bigg) (\xi^{\alpha} - 1).
\]
The associated control parameters are
\[
\chi = \rho_{\rm cl}/\rho_g,
\qquad
\xi = r_{\rm cl}/({\bf v}_{\rm turb} t_{\rm cool, peak}),
\qquad
{\bf v}_{\rm turb} = 0.1 {\bf v}_{\rm rel},
\]
with $\alpha = 1/4$ if $\xi \ge 1$, and $\alpha = 1/2$ otherwise. In the intended interpretation, rapidly cooling mixed gas can cause the cloud to **grow** by accreting mixed material; otherwise the cloud is **destroyed**. A plausible implication is that CGSim is designed to represent both condensation-dominated and ablation-dominated regimes within a single closure hierarchy.

The timestep is additionally constrained by drag coupling, following Laibe & Price-style two-fluid methods:
\[
\Delta t = {\rm min}\bigg(\frac{\rho_g \bar{\rho}_{\rm cl}}{K_{\rm drag} (\rho_g + \bar{\rho}_{\rm cl})}\bigg).
\]
The supplied description notes that the excerpt is truncated, but the intended purpose is explicit: the method imposes a drag-related timestep limit so that the two-fluid coupling remains numerically stable.

## 6. Validation, interpretation, and relation to adjacent usages

The validation program compares **high-resolution standard hydrodynamics**, **low-resolution standard hydrodynamics**, and **low-resolution CGSM** in idealized tests of thermal instability, spatial cold-gas distribution, cloud destruction, and cloud growth [2402.03419]. In a one-zone cooling test, standard hydrodynamics converts gas into a cold phase in a **step-like** way once the entire cell crosses the threshold, whereas CGSim produces a **gradual transfer** of mass. After one cooling time, CGSim yields roughly **two-thirds** of the gas as cold, and by three cooling times it saturates at about **83\%** cold rather than forcing an immediate $100\%$ conversion.

In 2D thermal-instability tests of a $16\times16$ kpc CGM patch, the contrast is qualitative and structural. **High-resolution hydrodynamics** produces a mist of $\sim 10$ pc cloudlets; **low-resolution hydrodynamics** produces a few artificially large, grid-sized clouds; and **CGSM at low resolution** reproduces the **qualitative spatial distribution** of the resolved run. In a cloud-in-wind problem, underresolved standard hydrodynamics makes the cloud size artificially large and therefore stretches the destruction time; the reported low-resolution hydro cloud-destruction time can be **nearly a thousand times too long**, while CGSim recovers the expected short timescale. When radiative cooling is included, CGSim also captures the expected **subgrid accretion / growth regime**, where resolved theory predicts cloud growth.

These results are interpreted cautiously. CGSim is **not** presented as a replacement for full-resolution hydrodynamics, but as a method that reproduces the **correct qualitative behavior** of unresolved cold CGM physics where standard simulations fail. It succeeds at allowing partial cold mass inside a cell, preventing the “one-cell cloud” artifact, reproducing smooth spatial cold-mass distributions, and capturing realistic destruction and growth timescales. The framework also highlights a common misconception in underresolved CGM modeling: standard low-resolution hydrodynamics can sometimes match total cold mass while still obtaining the right answer for the wrong reasons, because artificially inflated cloud sizes and lifetimes distort the underlying mechanism [2402.03419].

The broader design is explicitly **modular**. If future work supports different cloud-size scalings, new turbulence models, or added physics such as magnetic fields, conduction, turbulence, or cosmic rays, the prescriptions for $\dot{\rho}$, $\dot{\bf p}$, and $\dot{\varepsilon}$ can be updated without replacing the two-fluid architecture. That modularity also helps separate CGSim from unrelated uses of similar names in other subfields. **CCWSIM** addresses large-scale **categorical/geostatistical simulation** by performing CCSIM-style pattern search in **DWT approximation-coefficient space**, with a runtime-oriented realism–efficiency tradeoff [2404.00441]. **3DGauCIM** instead targets **real-time rendering of static and dynamic 3D Gaussian Splatting** on edge devices through co-designed culling, sorting, tile grouping, and DCIM-friendly dataflow, achieving reported frame rates above 200 FPS at low power [2507.19133]. Those frameworks share the broad language of simulation and acceleration, but they solve different problems and do not redefine CGSim in the astrophysical sense.

Source: https://www.emergentmind.com/topics/cgsim