Is there a way to do volume mesh deformation using runScript? #576
Replies: 6 comments 5 replies
-
This line deforms the FFD point and returns the deformed surface mesh coordinate Line 940 in 0f42fe5 Then, it gives the deformed surface point to DAFoam by calling line 947. Finally, it calls line 952 to deform the volume mesh. You can replace line 940 with your own geometry module. |
Beta Was this translation helpful? Give feedback.
-
No, modifying the points.gz file won't work because DAFoam does not read points.gz during optimization. It only writes points.gz. In other words, the mesh information is stored in memory during optimization, so any changes to the points.gz will not impact how DAFoam deforms the mesh. In this sense, you have to change the source code. You need to convert your surface mesh to a format that is consistent with |
Beta Was this translation helpful? Give feedback.
-
You can run the flow for only one step. It will output the deformed points.gz in the output folder/polyMesh. |
Beta Was this translation helpful? Give feedback.
-
Hi I have made some changes to the source code (specifically pyDAFoam.py file).
Now the problem is, when I run my case in parrallel, |
Beta Was this translation helpful? Give feedback.
-
If you use your own surface mesh deformation function, you have to manually split the surface points into multiple processors, following OpenFOAM's standard. xs should be the surface point coordinates owned by local processors |
Beta Was this translation helpful? Give feedback.
-
This is more like an OpenFOAM question. The way you map the local (owned by each processor in parallel) and global (serial runs) node IDs is correct. To figure out which node ID belongs to the design surface, you have to use |
Beta Was this translation helpful? Give feedback.
-
In the runScript, I'm looking for a way to execute volume mesh deformation only if I can update the design surface mesh coordinates using my own module.
I'm aware that pyGeo supplies design surface mesh coordinates to Idwarp for volume mesh deformation. However, I aim to bypass the use of pyGeo and directly manage Idwarp through the runScript. e.g. for running primal only, the following function is executed:
optFuncs.runAdjoint()
Is there such a function for volume mesh deformation too?
Any help regarding this will be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions