# add inferencer data
vtk_obj = VTKUniformGrid(
bounds=[limerock.geo_bounds[x], limerock.geo_bounds[y], limerock.geo_bounds[z]],
npoints=[256, 128, 256],
export_map={"u": ["u", "v", "w"], "p": ["p"], "theta_f": ["theta_f"]},
)
def mask_fn(x, y, z):
sdf = limerock.geo.sdf({"x": x, "y": y, "z": z}, {})
return sdf["sdf"] < 0
grid_inferencer = PointVTKInferencer(
vtk_obj=vtk_obj,
nodes=thermal_nodes,
input_vtk_map={"x": "x", "y": "y", "z": "z"},
output_names=["u", "v", "w", "p", "theta_f"],
mask_fn=mask_fn,
mask_value=np.nan,
requires_grad=False,
batch_size=100000,
)
cycle_1_domain.add_inferencer(grid_inferencer, "grid_inferencer")
add solid inferencer data
vtk_obj = VTKUniformGrid(
bounds=[
limerock.geo_hr_bounds[x],
limerock.geo_hr_bounds[y],
limerock.geo_hr_bounds[z],
],
npoints=[128, 128, 512],
export_map={"theta_s": ["theta_s"]},
)
def mask_fn(x, y, z):
sdf = limerock.geo.sdf({"x": x, "y": y, "z": z}, {})
return sdf["sdf"] > 0
grid_inferencer = PointVTKInferencer(
vtk_obj=vtk_obj,
nodes=thermal_nodes,
input_vtk_map={"x": "x", "y": "y", "z": "z"},
output_names=["theta_s"],
mask_fn=mask_fn,
mask_value=np.nan,
requires_grad=False,
batch_size=100000,
)
cycle_n_domain.add_inferencer(grid_inferencer, "grid_inferencer_solid")
Hi @ngeneva ,
Above is the code for postprocessing of limerock case, which create a grid_inferencer for the limerock and the solid part. But after I opened the vti file in paraview, it only gives me a whole square domain.
Basically I wanna conduct inference on the fluid and solid region separately, do the codes above mean the same intention? If so, how to do with this whole bounding box? will it only show the heat sink region by some filter in paraview?