Skip to content

Commit

Permalink
use formulae rho fun for initial air density in Pyrcel example. closes
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo authored Aug 1, 2023
1 parent 8add5ec commit dc8a402
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/PySDM_examples/Pyrcel/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ def __init__(

@property
def initial_air_density(self):
const = self.formulae.constants
dry_air_density = (
self.formulae.trivia.p_d(
return self.formulae.state_variable_triplet.rho_of_rhod_qv(
rhod=self.formulae.trivia.p_d(
self.initial_pressure, self.initial_vapour_mixing_ratio
)
/ self.initial_temperature
/ const.Rd
/ self.formulae.constants.Rd,
qv=self.initial_vapour_mixing_ratio,
)
return dry_air_density * (1 + self.initial_vapour_mixing_ratio)

@property
def nt(self) -> int:
Expand Down

0 comments on commit dc8a402

Please sign in to comment.