Skip to content

particula.dynamics.chemistry.resolved_device

Resident RK23 for resolved gas and particle material balance.

Attributes

NameDescription
NEGATIVE_THIRDNo description.
PINo description.
RNo description.
SAFETYNo description.
THIRDNo description.

Classes

NameDescription
NetworkImmutable reaction and solver configuration shared by boxes.
StagesWork vectors hold accepted state, trial state and four derivatives.

Functions

NameDescription
_evaluateNo description.
_integrateNo description.
_trialBogacki–Shampine stages with a common step for both reservoirs.
publishCommit each changed lane only after all boxes succeeded.
stageAdvance one thread per box into unpublished scratch.

NEGATIVE_THIRDattributemodule attribute#

NEGATIVE_THIRD = wp.constant(wp.float64(-1 / 3))

PIattributemodule attribute#

PI = wp.constant(wp.float64(3.141592653589793))

Rattributemodule attribute#

R = wp.constant(wp.float64(GAS_CONSTANT))

SAFETYattributemodule attribute#

SAFETY = wp.constant(wp.float64(0.9))

THIRDattributemodule attribute#

THIRD = wp.constant(wp.float64(1 / 3))

Networkclass#

class Network

Immutable reaction and solver configuration shared by boxes.

atolattributeinstance attribute#

atol: wp.float64

coefficients_netattributeinstance attribute#

coefficients_net: wp.array(dtype=int)

columnsattributeinstance attribute#

columns: wp.array(dtype=int)

densityattributeinstance attribute#

density: wp.array(dtype=wp.float64)

firstattributeinstance attribute#

first: wp.float64

gmattributeinstance attribute#

gm: wp.array(dtype=wp.float64)

kindsattributeinstance attribute#

kinds: wp.array(dtype=int)

limitattributeinstance attribute#

limit: int

maximumattributeinstance attribute#

maximum: wp.float64

minimumattributeinstance attribute#

minimum: wp.float64

offsetsattributeinstance attribute#

offsets: wp.array(dtype=int)

ordersattributeinstance attribute#

orders: wp.array2d(dtype=int)

paramsattributeinstance attribute#

params: wp.array2d(dtype=wp.float64)

pmattributeinstance attribute#

pm: wp.array(dtype=wp.float64)

rtolattributeinstance attribute#

rtol: wp.float64

sourcesattributeinstance attribute#

sources: wp.array(dtype=int)

Stagesclass#

class Stages

Work vectors hold accepted state, trial state and four derivatives.

countsattributeinstance attribute#

counts: wp.array2d(dtype=wp.int64)

ratesattributeinstance attribute#

rates: wp.array2d(dtype=wp.float64)

referenceattributeinstance attribute#

reference: wp.array2d(dtype=wp.float64)

vattributeinstance attribute#

v: wp.array3d(dtype=wp.float64)

weightsattributeinstance attribute#

weights: wp.array2d(dtype=wp.float64)

_evaluatefunction#

def _evaluate(m: Network, w: Stages, b: int, target: int)

_integratefunction#

def _integrate(m: Network, w: Stages, b: int, dt: wp.float64)

_trialfunction#

def _trial(m: Network, w: Stages, b: int, h: wp.float64)

Bogacki–Shampine stages with a common step for both reservoirs.

publishfunction#

def publish(m: Network, w: Stages, gas: wp.array2d(dtype=wp.float64), particles: wp.array3d(dtype=wp.float64), failure: wp.array(dtype=int))

Commit each changed lane only after all boxes succeeded.

stagefunction#

def stage(m: Network, w: Stages, gas: wp.array2d(dtype=wp.float64), particles: wp.array3d(dtype=wp.float64), counts: wp.array2d(dtype=wp.float64), volume: wp.array(dtype=wp.float64), temp: wp.array(dtype=wp.float64), dt: wp.float64, failure: wp.array(dtype=int))

Advance one thread per box into unpublished scratch.