Closed sreekar2858 closed 1 year ago
It looks like the function _writeOpenFOAMVolumePoints
was moved to pyofm, but the call was not updated in USMesh. The fix should be to just replace this call, is that right @friedenhe?
@sseraj, that is right. The _writeOpenFOAMVolumePoints
function is deprecated in IDWarp. @sreekar2858, to test IDWarp, please deform the mesh and run the primal solver for one step. It will save the flow solution and the deformed mesh to a folder called "1". You can then use Paraview to load the "1" step and visualize the mesh change.
Thank you for the prompt response. I can't change the call within docker to pyofm, can I? If yes, can you please direct me how?
No, you can't. There is no easy way to directly output the volume mesh without calling the primal solver.
No, you can't. There is no easy way to directly output the volume mesh without calling the primal solver.
Do you suggest any other way of morphing mesh that has good results as IDWarp? I would like to deform the solid mesh based on a list of points. At some locations the elements are collapsing, so, it would be great if you recommend an alternative short-term.
@sreekar2858, to test IDWarp, please deform the mesh and run the primal solver for one step. It will save the flow solution and the deformed mesh to a folder called "1". You can then use Paraview to load the "1" step and visualize the mesh change.
Sorry, I don't understand what you mean by deform the mesh. I am using dafoam's docker container but the case I shared is for plain OpenFOAM with no optimization. Can you please elaborate on how I can deform the mesh?
My goal is not to optimize the geometry but rather deform it at specific surfaces with corresponding known nodal/ FFD location.
Thank you for the reference I tried using deformMesh on the same geometry I ran optimization on to make it simple. I got the shapez values from out file and modified the json file retaining all other information. I also changed the task to "deformMesh". I can see the mesh change but it is not the same and it is overlapping as in the picture. Also you can notice that the deformed mesh is overlapping
I am also attaching the runscript for reference runScript_v2.zip
Thank you Sreekar
@sseraj Also can I ask if there is any docker image with IDWarp besides DAFoam?
The MDO Lab docker images also include IDWarp, but the deprecated function call will still be in that image. We will try to update the code soon.
Thanks for bringing this up. It is on my todo list and I will address it soon.
@friedenhe I am unable to get desired result from "deformMesh". Can you please check the above response if I did anything incorrect?
Your run script looks OK, I suspect the issue is in the design variable json file. I suggest you load a json file that has only one shape variable that is non-zero, and then gradually add more non-zero design variables for debugging.
Description
I have an cube OpenFOAM mesh and tried to deform top and side faces by x1.05 to test if idwarp works. But I am getting an error at the end of the run. I am attaching the case directory with .py file for reference. OF_idwarp.zip
Steps to reproduce issue
Current behavior
Python is throwing error that
Expected behavior
It should've changed the polyMesh in OpenFOAM directory
Code versions