---
title: "Molecular Cloud Collapse and Magnetic Support Interactive Lab | Sandbox Physics"
description: "Will this gas rebound or gather under gravity? A short density ripple can rebound as pressure pushes gas outward."
canonical_url: "https://sandboxphysics.com/labs/molecular-cloud-jeans/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/molecular-cloud-jeans/"
last_modified: "2026-11-04"
---

Pressure, gravity and direction

# Molecular Cloud Collapse and Magnetic Support

**Will this gas rebound or gather under gravity?** A short density ripple can rebound as pressure pushes gas outward. A longer ripple can grow through self-gravity. A magnetic field changes this response by direction: compression along the field can grow even when cross-field compression is restored.

Watch a gas ripple respond to pressure and gravity. Rotate a field in a separate linear magnetic wave, then probe and save the computed state.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

The nonlinear branch evolves nonmagnetic isothermal Euler–Poisson gas with an invariant third direction, volume density and mass per unit depth. The x/y box is periodic; Poisson responds to density minus its instantaneous mean, so the uniform global-collapse mode is removed. The browser uses a conservative 64-by-64 grid in the sampled Jeans-ratio and amplitude range through time two; sampled convergence comparisons do not establish a uniform error theorem. The fixed time-two-and-a-half reference is a separate benchmark. A candidate below eight local thermal Jeans cells is rejected; that indicator alone does not certify fragmentation. The magnetic branch separately integrates a strictly linear six-variable ideal-MHD–gravity wave on a uniform background and stops before a relative disturbance cap; it is not nonlinear magnetic collapse. Magnetic direction is retained, with no isotropic sound-speed replacement. Density and velocity come from the same saved state. Isothermal closure prescribes temperature, rather than solving thermal balance or radiative losses. There is no driven turbulence, sink conversion, feedback, observed cloud image or stellar mass-function inference. Colors interpolate numerical samples; velocity arrows are enlarged. Dragging the initial-density center prepares a new initial condition.

## Read the state, then test its interpretation

Signed wave amplitude through accepted steps

Cyan: computed state. Pale dashed: separate small-wave, start-from-rest limit.

Density across the selected probe row

The amber marker selects an actual cell.

This is a numerical gas section, not a telescope image. The nonlinear gas and strictly linear magnetic wave are separate models. Export saves the accepted arrays, configuration, history, selected probe and units.

Physics tutorial

## Follow a ripple from rest

**Background** A slightly denser patch pulls gas inward. Pressure gradients push back. Their competition depends on the wavelength as well as temperature and density.

**Why it matters** A dense knot on a grid can be physical gathering or an unresolved numerical result. Following its conserved mass and local Jeans resolution helps separate those questions.

Start with the essentials

- **Focus question**: What changes when the same ripple lies along or across a magnetic field?
- **One-sentence intuition**: Pressure opposes compression, gravity favors it, and magnetic forces depend on direction. A linear magnetic wave and a nonlinear gas calculation answer different questions.

### Core mathematical model

#### Continuity

$$
\partial_t\rho+\nabla\cdot(\rho\boldsymbol v)=0
$$

Mass crossing one cell face enters its neighbor. The periodic box has no external mass source.

#### A small nonmagnetic wave

$$
\omega^2=c_s^2k^2-4\pi G\rho_0
$$

Positive squared frequency gives oscillation. Negative squared frequency permits growth; the initial velocity determines how much growing and decaying motion is present.

#### Directional magnetic response

$$
\omega^4-[(c_s^2+v_A^2)k^2-\omega_J^2]\omega^2+v_A^2k^2\cos^2\theta(c_s^2k^2-\omega_J^2)=0
$$

The compressive branches retain the angle between wavevector and field. Along-field thermal collapse is not removed by increasing field strength.

### Common difficulties

#### A knot is not a star

**Typical misconception** Each bright numerical patch is a newly formed star.

**Better mental model** This is isothermal gas with no sinks, thermal feedback or stellar mass inference. The calculation stops within a bounded operating window.

#### Magnetic support has a direction

**Typical misconception** A magnetic field is just a larger sound speed in every direction.

**Better mental model** The separate linear branch evolves magnetic induction and transverse velocity. Rotating the field changes those couplings; it is not a nonlinear MHD cloud.

### Run the experiment

1. 01

   #### Watch pressure rebound

   Choose Pressure rebound and watch the signed-wave history turn downward.

   **What to observe:** The gas starts at rest. A short thermal wavelength restores the ripple instead of sustaining its growth.

2. 02

   #### Prepare a different center

   Choose Gas gathering and drag the cyan center. This restarts from a translated initial density ripple.

   **What to observe:** The full periodic box stays in view. The amber probe samples the current computed cell, independently of the initial center.

3. 03

   #### Turn a real magnetic direction

   Choose Linear along-field growth, then drag the field handle toward a right angle.

   **What to observe:** The strictly linear response changes because velocity and magnetic perturbations couple differently. The relative-amplitude stop protects this approximation.

4. 04

   #### Read the same saved state

   Pause, move the amber probe, and save the current field. Compare its selected row and wave history.

   **What to observe:** The colors, velocities, probe values and exported arrays all come from the accepted state. The pale small-wave curve is a separate reference.

Physical conclusion

A useful cloud calculation connects its density picture to dynamics, conserved mass and a declared resolution limit. Direction matters when magnetic forces enter.

## Related experiments and articles

Molecular clouds, gravity and magnetic direction · Reading path

### Molecular clouds, gravity and magnetic direction

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Why cold gas can gather into dense structures**](https://sandboxphysics.com/stories/molecular-clouds/why-cold-clouds-gather/)
2. [Article **How the Jeans scale separates oscillation and growth**](https://sandboxphysics.com/stories/molecular-clouds/jeans-length-and-a-clouds-mass/)
3. [Article **Magnetic support depends on direction**](https://sandboxphysics.com/stories/molecular-clouds/magnetic-support-has-a-direction/)
4. [Article **When a grid can no longer resolve contraction**](https://sandboxphysics.com/stories/molecular-clouds/when-a-cloud-grid-stops-being-evidence/)
5. [Article **Replaying an official Jeans initial condition**](https://sandboxphysics.com/stories/molecular-clouds/replay-the-official-jeans-input/)
6. [Article **One converged mass scale does not establish an IMF**](https://sandboxphysics.com/stories/molecular-clouds/why-a-converged-mass-is-not-the-imf/)

Motion & dynamics · Starter path

## From a falling ball to an orbit

Start by measuring gravity and splitting motion into components. Then add contact forces and collisions, and follow the same laws all the way to an orbit.

[Start here → **Free Fall & Measuring Gravity** Capture a few drops and fit the camera positions to estimate gravitational acceleration. Then add air damping and watch the fit drift from the truth. Observe · 14 min](https://sandboxphysics.com/labs/free-fall/)

1. [1 Free Fall & Measuring Gravity](https://sandboxphysics.com/labs/free-fall/)
2. [2 Projectile Flight Designer](https://sandboxphysics.com/labs/projectile-flight/)
3. [3 Inclined Plane & Friction](https://sandboxphysics.com/labs/inclined-plane/)
4. [4 One-Dimensional Collision Bench](https://sandboxphysics.com/labs/collision-bench/)
5. [5 Mass–Spring Oscillator](https://sandboxphysics.com/labs/mass-spring/)
6. [6 How Orbits Take Shape](https://sandboxphysics.com/labs/orbit/)

[View the full path →](https://sandboxphysics.com/topics/mechanics/#starter-path)
