From fba3e53bb6544f19411c70ea3b8a01160165ad72 Mon Sep 17 00:00:00 2001 From: L-Nafaryus Date: Wed, 22 Dec 2021 22:50:15 +0500 Subject: [PATCH] Mod: database new fields --- anisotropy/core/runner.py | 4 ++++ anisotropy/database/models.py | 8 ++++++++ environment.yml | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/anisotropy/core/runner.py b/anisotropy/core/runner.py index 4a21394..f119ad0 100644 --- a/anisotropy/core/runner.py +++ b/anisotropy/core/runner.py @@ -146,6 +146,10 @@ class UltimateRunner(object): if not returncode: shapeParams.shapeStatus = "done" + shapeParams.volume = self.shape.shape.volume + shapeParams.volumeCell = self.shape.cell.volume + shapeParams.porosity = shapeParams.volume / shapeParams.volumeCell + else: logger.error(err) shapeParams.shapeStatus = "failed" diff --git a/anisotropy/database/models.py b/anisotropy/database/models.py index d5f7ed0..5eab8b0 100644 --- a/anisotropy/database/models.py +++ b/anisotropy/database/models.py @@ -84,6 +84,14 @@ class FlowOnephase(Model): flowStatus = TextField(null = True, default = "idle") flowExecutionTime = TimeField(null = True) + pressureInlet = FloatField(null = True) + pressureOutlet = FloatField(null = True) + pressureInternal = FloatField(null = True) + velocityInlet = FloatField(null = True) + velocityOutlet = FloatField(null = True) + velocityInternal = FloatField(null = True) + viscosity = FloatField(null = True) + density = FloatField(null = True) flowRate = FloatField(null = True) permeability = FloatField(null = True) diff --git a/environment.yml b/environment.yml index e07ec9b..56de3d9 100644 --- a/environment.yml +++ b/environment.yml @@ -8,4 +8,4 @@ dependencies: - poetry - sqlite - occt - - netgen==master + - netgen