Moved fluidfoam to olaflow file
This commit is contained in:
parent
62af6a03ed
commit
4869c982bb
2 changed files with 20 additions and 5 deletions
|
@ -6,7 +6,6 @@ import re
|
|||
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from fluidfoam import readof
|
||||
from scipy import interpolate
|
||||
|
||||
from .olaflow import OFModel
|
||||
|
@ -30,11 +29,10 @@ sws = np.load(sws_out.joinpath("sws.npz"))
|
|||
x, t = sws["x"], sws["t"]
|
||||
|
||||
olaflow_root = pathlib.Path(config.get("olaflow", "root"))
|
||||
of_x, of_y, of_z = mesh = readof.readmesh(str(olaflow_root))
|
||||
model = OFModel(olaflow_root)
|
||||
model.read_mesh()
|
||||
|
||||
watl = interpolate.interp1d(x, sws["watl"][680])
|
||||
alpha_water = np.where(model.z < watl(model.x), 1, 0)
|
||||
|
||||
alpha_water = np.where(of_z < watl(of_x), 1, 0)
|
||||
|
||||
model = OFModel(olaflow_root)
|
||||
model.write_field("alpha.water", alpha_water)
|
||||
|
|
Reference in a new issue