sandialabs / pyNuMAD

pynumad is an object-oriented, open-source software program written in Python which simplifies the process of creating a three-dimensional model of a wind turbine blade.
https://sandialabs.github.io/pyNuMAD/
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

Getting started with pynumad and Ansys #41

Open mcMunich opened 8 months ago

mcMunich commented 8 months ago

Hello, I am testing out the pynumad to see if I can get it to generate and solve in Ansys. I have previously used numad and work with the pyansys codes.

There are some minor issue in the APDL scripting (and in the future, maybe it can be moved over to pymapdl: https://mapdl.docs.pyansys.com/version/stable/).

I found some issues when running the ansys_example.py file. I am trying to run it in my python virtual environment and that wasn't super straightforward. But some of my issues were and might be related to a py venv. (path issues also).

Notes: I am trying to run the ansys_example.py code on windows but there is a line in the run.py file that is using linux/posix syntax. run.py line 12: 'export kmp_affinity=' is linux/posix? For windows one needs to use 'set kmp_affinity='

forces.src The forces.src file starts the node loads at node 0 which don't exist in APDL, likely this is just an oversight.

The write.py file has a mpwrite that fails line 1178 in write_ansys_loads fails because a previous /post1, mpwrite needs to be called from prep7. Add a /prep7 right before.

If I try to load the myBlade_Modified.mac file in APDL I get a lot of shape errors (I used a not recommended SHPP, OFF to avoid that issue) but then the last errors come up that the last few EMODIF commands are being ignored since the elements don't exist (last two or three in my file at least).

When I was trying to debug this i was finding that some of the spar elements were labeled ! 11_28_LP_TE_FLAT sectype,348,shell and these were causing rigid body motion when I tried to solve.

And the filname command in the ansysAnalysis.mac fails because it needs to be called in the BEGIN processor. You can just add a FINI command right before it in the main_ansys_analysis.py, line 118.

Right now I get a the blade flying off because of the spar element error. The model solves for a modal analysis but the modes are just the spar and not the entire model/blade. The element appears to be connected but something else seems to go wrong. Might be the esys and mat/section definition. I am very interested in helping get this to work and hope my issues are not just a user error (I am in Germany and hope some language settings are not the cause). You can @mcMunich if there is anything more i can provide. Or post it here and I will get in touch.

veliemresavas commented 1 month ago

Hello,

Thanks for this issue, but there is no line 1178 in the write.py file. How do i implement that /prep7. Also while running the ansys example i encounter such issue: mesh_data=shell_mesh_general(blade, forSolid=False, includeAdhesive=False, elementSize=elementSize) getting blade mesh getting element orientations C:\Users\Veli\pyNuMAD\src\pynumad\mesh_gen\element_utils.py:241: RuntimeWarning: divide by zero encountered in scalar divide v2 = (1.0/mag)v2 C:\Users\Veli\pyNuMAD\src\pynumad\mesh_gen\element_utils.py:241: RuntimeWarning: invalid value encountered in multiply v2 = (1.0/mag)v2 getting adhesive mesh

Did you encounter this issue too? Thanks in advance