Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5e8c3a7
[wingMotion] initial implementation
tmaric Apr 14, 2024
724c900
[meshMotion] SLURM setup for wingMotion2D
tmaric Apr 17, 2024
e6eae8a
[meshMotion] stronger deformation and longer simulation time
tmaric Apr 17, 2024
feea045
[meshMotion] reduced RMSE output for wingMotion
tmaric Apr 17, 2024
f4fdd08
Split out the trainer and generate all entities
ashao Apr 17, 2024
5c15c63
Merge pull request #21 from ashao/feature/meshMotion
tmaric Apr 18, 2024
1a0fdaa
[meshMotion] wing2D adjust flow parameters for debugging
tmaric Apr 18, 2024
d75359e
[wingMotion] closed trailing-edge boundary layer with snappy
tmaric Apr 24, 2024
ce225d2
[wingMotion] enable local mpirun execution
tmaric Apr 24, 2024
a4b13d2
[wingMotion] Allrun scripts for Laplace and ML comparison
tmaric Apr 28, 2024
36df0cd
[wingMotion] ML training improved
tmaric May 1, 2024
983298d
[wingMotion] automatic visualization
tmaric May 1, 2024
6220dc7
[wingMotion] updated README.md
tmaric May 1, 2024
660833a
[wingMotion] fixed comment
tmaric May 1, 2024
ac5a898
[wingMotion] RELU is faster and equally accurate
tmaric May 1, 2024
be0da51
[meshMotion] RELU, parameterized num_mpi_ranks, early stopping
tmaric Jul 16, 2024
312b670
[meshMotion] cylinderMotion initial setup
tmaric Sep 18, 2024
560da74
[meshMotion] working with smartsim 0.8.0
tmaric Dec 26, 2024
089536a
[mesh motion] working WendlandLinear C4 2D RBF
tmaric Mar 14, 2025
b1ee5f5
[mesh motion] RBF validation for stream function
tmaric Mar 20, 2025
5523498
[mesh motion] RBF convergence tests added
tmaric Mar 20, 2025
cbbd7ad
[mesh motion] ingore .png .csv in pyTorchApproximationModels
tmaric Mar 20, 2025
6d970a0
[mesh motion] Gaussian RBF with compact support - spectral convergence
tmaric Mar 20, 2025
ff52b4e
[mesh motion] RBF Gaussian 3d order convergence
tmaric Mar 20, 2025
bf51ede
[mesh motion] generalized RBF network, Gaussian converges
tmaric Mar 20, 2025
5e3aa2f
[mesh motion] best gaussian approximation settingss for stream function
tmaric Mar 20, 2025
8cc3db2
[mesh motion] initial working RBF boundary velocity interpolation
tmaric Mar 21, 2025
b08b49d
Merge branch 'main' into feature/meshMotion
tmaric Jun 15, 2025
9894cb8
Add pinn-loss
Kevinletsgo Jul 24, 2025
2c8fc8b
Merge branch 'OFDataCommittee:main' into feature/mesh-motion-pinn
Kevinletsgo Jul 24, 2025
da0a018
add early stop
Kevinletsgo Sep 14, 2025
4d2bbf9
Merge remote-tracking branch 'origin/feature/mesh-motion-pinn' into f…
Kevinletsgo Sep 14, 2025
6f92162
trainer_pinn
Kevinletsgo Sep 15, 2025
8c74514
model not failed
Kevinletsgo Sep 17, 2025
abc37cc
training works
Kevinletsgo Sep 17, 2025
1272df3
new visualized
Kevinletsgo Sep 23, 2025
55a6c79
update lbfgs optimizer and annealing strategy
Kevinletsgo Oct 28, 2025
9054c22
save all files
Kevinletsgo Oct 31, 2025
1c6804b
put all
Kevinletsgo Nov 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,7 @@ polyMesh/

# Jupyter Notebook checkpoints
.ipynb_checkpoints/

# Time step folders
[0-9][0-9]*
0/
Empty file.
22,746 changes: 22,746 additions & 0 deletions .history/run/meshMotion/diff_20251110174823.psvm

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------



echo Copy the template case and set dynamicMesh for Machine Learning
(
cp -r ellipsoid3D

echo Set mesh motion settings to Laplace mesh motion
cp constant/dynamicMeshDict.MachineLearningMeshMotion constant/dynamicMeshDict

runParallel $(getApplication)

cd ..

echo Copy data for comparison
cp -r wingMotion2D_pimpleFoam mesh-motion_Laplace

echo Reset mesh motion settings
git checkout wingMotion2D_pimpleFoam/constant/dynamicMeshDict

echo Create .foam file visualization in ParaView
touch mesh-motion_Laplace/laplace.foam

echo Generate mesh quality metrics
mpirun -np 4 checkMesh \
-case mesh-motion_Laplace \
-writeFields '(nonOrthoAngle skewness)' -parallel
)

#------------------------------------------------------------------------------
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------

./Allclean

./Allrun.pre

echo Delete previous results mesh-motion_Pinn
rm -rf mesh-motion_Pinn

echo Use the constant/dynamicMesh.laplace settings and run the solver locally
(
cd wingMotion2D_pimpleFoam || exit

echo Set mesh motion settings to Pinn mesh motion
cp constant/dynamicMeshDict.PinnMeshMotion constant/dynamicMeshDict

cd ..

echo Run the SmartSim python script that implements the Pinn+CFD algorithm
python openfoam-smartsim-wingmotion_pinn.py

echo Copy data for comparison
cp -r mesh-motion mesh-motion_Pinn

echo Reset mesh motion settings
git checkout wingMotion2D_pimpleFoam/constant/dynamicMeshDict

echo Create .foam file for visualization in ParaView
touch mesh-motion_Pinn/of_model/pinn.foam

echo Generating mesh quality metrics
mpirun -np 4 checkMesh \
-case mesh-motion_Pinn/of_model \
-writeFields '(nonOrthoAngle skewness)' -parallel
)

#------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------

./Allclean

./Allrun.pre

rm -rf mesh-motion_Laplace

echo Use the constant/dynamicMesh.laplace settings and run the solver locally
(
cd wingMotion2D_pimpleFoam || exit

echo Set mesh motion settings to Laplace mesh motion
cp constant/dynamicMeshDict.LaplaceMeshMotion constant/dynamicMeshDict

runParallel $(getApplication)

cd ..

echo Copy data for comparison
cp -r wingMotion2D_pimpleFoam mesh-motion_Laplace

echo Reset mesh motion settings
git checkout wingMotion2D_pimpleFoam/constant/dynamicMeshDict

echo Create .foam file visualization in ParaView
touch mesh-motion_Laplace/laplace.foam

echo Generate mesh quality metrics
mpirun -np 4 checkMesh \
-case mesh-motion_Laplace \
-writeFields '(nonOrthoAngle skewness)' -parallel
)

#------------------------------------------------------------------------------
31 changes: 31 additions & 0 deletions .history/run/meshMotion/wingMotion/README_20250630110441.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Running

The 2D wing is rapidly translated and rotated, causing significant mesh deformation. The deformation is implemented as

1. Laplace deformation available in OpenFOAM
2. MLP Machine-Learning deformation, combining Pytorch and OpenFOAM via SmartSim/SmartRedis.

To run Laplace deformation make sure SmartSim env and OpenFOAM env are sourced, then

```
wingMotion> ./Allrun.LaplaceMeshMotion
```

this creates `mesh-motion_Laplace` - a folder that is an OpenFOAM simulation, for Laplace deformation, we don't need SmartSim/SmartRedis.

Tor run the SmartSim MLP mesh deformation, run

```
wingMotion> ./Allrun.MachineLearningMeshMotion
```

which creates `mesh-motion_MachineLearning`, which has sub-folders for the SmartSim orchestrator, for the openfoam model (`of_model`, OpenFOAM simulation case), and the MLP training script (`training_app`).


Both `Allrun.LaplaceMeshMotion` and `Allrun.MachineLearningMeshMotion` will compute mesh quality metrics (most important ones are non-orthogonality and skewness), and `.foam` files that ParaView needs to recognize OpenFOAM folders. A paraview state file is prepared that compares the decrease in non-orthogonality, visualizing the difference between Laplace non-orthogonality and MLP non-orthogonality, run it as

```
wingMotion> paraview --state=visualize-non-orth-difference.pvsm
```

This will show how the Laplace causes an increase of non-orthogonality at the worst possible place - next to the airfoil. The increase is up to 35 degrees, w.r.t a simple MLP.
31 changes: 31 additions & 0 deletions .history/run/meshMotion/wingMotion/README_20250923215408.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Running

The 2D wing is rapidly translated and rotated, causing significant mesh deformation. The deformation is implemented as

1. Laplace deformation available in OpenFOAM
2. MLP Machine-Learning deformation, combining Pytorch and OpenFOAM via SmartSim/SmartRedis.

To run Laplace deformation make sure SmartSim env and OpenFOAM env are sourced, then

```
wingMotion> ./Allrun.LaplaceMeshMotion
```

this creates `mesh-motion_Laplace` - a folder that is an OpenFOAM simulation, for Laplace deformation, we don't need SmartSim/SmartRedis.

Tor run the SmartSim MLP mesh deformation, run

```
wingMotion> ./Allrun.MachineLearningMeshMotion
```

which creates `mesh-motion_MachineLearning`, which has sub-folders for the SmartSim orchestrator, for the openfoam model (`of_model`, OpenFOAM simulation case), and the MLP training script (`training_app`).


Both `Allrun.LaplaceMeshMotion` and `Allrun.MachineLearningMeshMotion` will compute mesh quality metrics (most important ones are non-orthogonality and skewness), and `.foam` files that ParaView needs to recognize OpenFOAM folders. A paraview state file is prepared that compares the decrease in non-orthogonality, visualizing the difference between Laplace non-orthogonality and MLP non-orthogonality, run it as

```
wingMotion> paraview --state=diff.pvsm
```

This will show how the Laplace causes an increase of non-orthogonality at the worst possible place - next to the airfoil. The increase is up to 35 degrees, w.r.t a simple MLP.
Loading