Time-resolved boundary conditions from mesh data


I want to impose boundary conditions based on our fluid dynamic simulations. The data is 3D + time and stored as tetrahedral meshes. I have been reading how to import the geometry from .stl files, but I’m not sure how to import the time-resolved velocity as boundary conditions. I have separated the inlet and outlet surfaces and extracted the velocity data as flattened numpy arrays. Then, I have been trying to load the velocity data through PointwiseBoundaryConstraint.from_numpy(), but I keep getting the following error:

 File ~/modulus/examples/RT/code/temp.py:107 in <module>
    inlet = PointwiseBoundaryConstraint.from_numpy(

  File ~/miniconda3/envs/torch/lib/python3.8/site-packages/modulus-22.3-py3.8.egg/modulus/continuous/constraints/constraint.py:178 in from_numpy
    return cls(dataset, nodes, num_workers, loss)

  File ~/miniconda3/envs/torch/lib/python3.8/site-packages/modulus-22.3-py3.8.egg/modulus/continuous/constraints/constraint.py:257 in __init__
    invar = geometry.sample_boundary(

AttributeError: 'list' object has no attribute 'sample_boundary'

I’m sure I’m missing something important. I have attached a sample inlet surface if it may be of help.

prueba.vtu (45.9 KB)