Monitor the Continuity and momentum residuals in Sequential solver

Dear all, I did many trials to monitor the Continuity and momentum residuals for the Taylor Green Vortex problems but all trials failed.

Can you please give a hint on how to do.


Hi @omarkhaledsallam

The annular ring problem has a point wise monitor implemented you can use for a reference implementation.

Thanks for your reply,
Yes I am familiar on how to setup a monitor,
But this does not work with problems that has moving window architectures.

This is my monitor part:

monitor = PointwiseMonitor(
    # Train_data_invar_numpy,
    # invar={"t": np.full([128 ** 3, 1], 1)},
    # output_names=["continuity","momentum_x","momentum_y","momentum_z"],
    # metrics={"continuity": lambda var: torch.sum(var["area"] * torch.abs(var["continuity"])) ,
      metrics={"continuity": lambda var:  torch.abs(var["continuity"]),

This takes very long time then the kernel restarts.

Also while the simulation proceeds without the monitor part, loss metric is printed on the screen, can you please advice how to save this loss data to a file

Thanks in advance