Hello! I’m currently using NVIDIA Modulus for a physics simulation and need to export scatter coordinate data for subsequent analysis. I would appreciate any help from the community.
Current situation:
- I’ve completed a simulation of a physical field using Modulus
- I’ve set up an inflow boundary condition using PointwiseBoundaryConstraint
- I need to extract the scatter point coordinates from this constraint for further analysis
Here’s my current code:
from modulus.sym.domain.constraint import PointwiseBoundaryConstraint
from modulus.sym.geometry.primitives_2d import Rectangle, Line, Channel2D
left_inlet = Line((0, 1), (0, 2))
left_inflow = PointwiseBoundaryConstraint(
nodes=nodes,
geometry=left_inlet,
outvar={"u": 4.0, "v": 0.0, "normal_gradient_c":0},
batch_size=cfg.batch_size.left_inflow,
parameterization={t: (0, 10)},
)
domain.add_constraint(left_inflow, "left_inflow")
Specific questions:
- Does Modulus provide a specific API for exporting scatter point coordinates from PointwiseBoundaryConstraint?
- If yes, what is the correct method to use it?
- If there’s no official API, are there any alternative approaches you would recommend?
Thank you in advance for any help! I’m happy to provide additional information if needed.