Skip to content

Commit

Permalink
use formulae rho fun when for initial air density. closes #1108
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo authored Jul 30, 2023
1 parent 94d2c01 commit efacd67
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions examples/PySDM_examples/Pyrcel/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,12 @@ 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.initial_temperature / 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 efacd67

Please sign in to comment.