This example demonstrates how to set up a data-driven model for a 2D Darcy flow using the Transolver inside of Modulus.
Training progress can be tracked through MLFlow. This example runs on a single GPU.
To train the model following modulus's settings, simply run
python train_transolver_darcy.py
Each batch is a new data generated by equation, which is different from commonly-used settings.
To reproduce the results in the paper, run
python train_transolver_darcy_fix.py
In this case, the train set and test set are fixed after the construction of Dataset, corresponding to Transolver's setting.
In the fixed case, extra data is needed for training and the data path should be added when Darcy_2D_fix dataset is constructed. You can download the data here.
More components are added for convenience. Validators
calculate the loss between
ground-truth and prediction, and visualize them in ./mlruns
. Below is a simple example
of visualization.