NVIDIA / modulus-sym

Framework providing pythonic APIs, algorithms and utilities to be used with Modulus core to physics inform model training as well as higher level abstraction for domain experts
https://developer.nvidia.com/modulus
Apache License 2.0
163 stars 68 forks source link

🐛[BUG]: How to get wall velocity gradients for the aneurysm problem? #145

Closed YouqiongLiu closed 5 months ago

YouqiongLiu commented 5 months ago

Version

nvidia-modulus: 0.4.0 nvidia-modulus.sym:1.2.0

On which installation method(s) does this occur?

No response

Describe the issue

I am trying to get wall velocity gradients for my aneurysm problem. However, it doesn’t seem to work. modsim_var = csv_to_dict(to_absolute_path("modsim/modsim_wfenz_hiresbl.csv"), mapping) modsim_invar = {key: value for key, value in modsim_var.items() if key in ["x", "y", "z"]} modsim_invar_grid = normalize_invar(modsim_invar, center1, scale, dims=3) modsim_outvar = {key: value for key, value in modsim_var.items() if key in ["u", "v'', "w", "p",''u__y']} modsim_validator = PointwiseValidator(nodes=nodes,invar=modsim_invar_grid, true_outvar=modsim_outvar, batch_size=4096, plotter=ValidatorPlotter()) domain.add_validator(modsim_validator, "modsim_hiresbl_validator")

Minimum reproducible example

No response

Relevant log output

No response

Environment details

No response

Other/Misc.

No response

YouqiongLiu commented 5 months ago

However, it doesn’t seem to work. mapping = { "Points:0": "x", "Points:1": "y", "Points:2": "z", "U:0": "u", "U:1": "v", "U:2": "w", "p": "p", "wss": "u__y" } modsim_var = csv_to_dict(to_absolute_path("modsim/modsim_wfenz_hiresbl.csv"), mapping) modsim_invar = {key: value for key, value in modsim_var.items() if key in ["x", "y", "z"]} modsim_invar_grid = normalize_invar(modsim_invar, center1, scale, dims=3) modsim_outvar = {key: value for key, value in modsim_var.items() if key in ["u", "v'', "w", "p","u__y"]} modsim_validator = PointwiseValidator(nodes=nodes,invar=modsim_invar_grid, true_outvar=modsim_outvar, batch_size=4096, plotter=ValidatorPlotter()) domain.add_validator(modsim_validator, "modsim_hiresbl_validator")