How to plot the error between Modulus and Validation data?

Hi there,

I’d like to create a validation file (.vtp), which also contains the pointwise error between the validation data (.csv from openfoam) and the values of Modulus.

The file “validation.vtp” already contains the selection of predicted and true values, but how can I combine them to plot the error of each output?

Is there a way doing this without changing the source code?

Many thanks in advance.

1 Like

I think you can define your custom validation functions to create new validation files or edit existing ones.

Thank you.

According to my understanding the CustomValidatorPlotter is only for plotting in Tensorboard. My goal is to get the file “validation.vtp” including the error, just like the ValidatorPlotter does in TensorBoard.

I’ve already tried to use var_to_polyvtk, but I’m not shure how to access the arrays of the true values (from validation file).

Hi @jflatter

If I understand your question correctly, assuming you already have the prediction and true values in the same VTK file, then the best way is to simply apply a calculator filter on the data in Paraview to get your quantity of interest. (You can then save that VTK file) This is the intended workflow.

If you want this done in Modulus automatically, then you would have to make some adjustments to the code. Theres some docs on the VTK utils in Modulus but you would need to add your quantity of interest to the output in the validator/inferencer/constraint (e.g. for validator).