-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mass instead of volume as base attribute (incl. introduction of physi…
…cs.particle_shape_and_density) (#1147) Co-authored-by: Oleksii Bulenok <[email protected]> Co-authored-by: Agnieszka Makulska <[email protected]> Co-authored-by: derlk <[email protected]>
- Loading branch information
1 parent
9e97c39
commit 10a05b1
Showing
90 changed files
with
1,082 additions
and
604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,7 @@ dmypy.json | |
.code-workspace | ||
|
||
# Mac stuff | ||
**.DS_Store | ||
**.DS_Store | ||
|
||
#Jetbrains | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
""" | ||
particle mass, derived attribute for coalescence | ||
in simulation involving mixed-phase clouds, positive values correspond to | ||
liquid water and negative values to ice | ||
""" | ||
from PySDM.attributes.impl import ExtensiveAttribute | ||
|
||
|
||
class WaterMass(ExtensiveAttribute): | ||
def __init__(self, builder): | ||
super().__init__(builder, name="water mass") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
""" | ||
particle (wet) volume, key attribute for coalescence | ||
particle volume (derived from water mass); | ||
in simulation involving mixed-phase clouds, positive values correspond to | ||
liquid water and negative values to ice | ||
""" | ||
from PySDM.attributes.impl.extensive_attribute import ExtensiveAttribute | ||
from PySDM.attributes.impl import DerivedAttribute | ||
|
||
|
||
class Volume(ExtensiveAttribute): | ||
class Volume(DerivedAttribute): | ||
def __init__(self, builder): | ||
super().__init__(builder, name="volume") | ||
self.water_mass = builder.get_attribute("water mass") | ||
super().__init__(builder, name="volume", dependencies=(self.water_mass,)) | ||
|
||
def recalculate(self): | ||
self.particulator.backend.volume_of_water_mass(self.data, self.water_mass.get()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.