Migrating from Ansys to Julia

Hi all.

Together with a colleague I am exploring how to migrate certain finite element computations from Ansys Mechanical to something in the Julia world. The computations are fairly standard: Suppose that a solid structure is subjected to a distribution of forces along its boundary surface, then compute the deformation of the structure and the stresses in the structure. We are looking for previous experiences with such a journey but have so far failed to find any when searching the internet. We might be missing the obvious.

I should add that while I know some Julia, I am completely new to finite elements. I already know of the existence of Julia packages such as Ferrite.jl and Gridap.jl and the impressive list at GitHub - JuliaPDE/SurveyofPDEPackages: Survey of the packages of the Julia ecosystem for solving partial differential equations, so I am confident that our problems can be solved in the Julia world. What is unclear to me is how much we have to start from scratch.

Would it for example be possible to export an already computed mesh from Ansys and perform the remaining computations and postprocessing in Julia? If so, how?

I know my questions are vague and that there might not be a simple answer, but perhaps we are lucky and someone thinks “Oh, I’ve been through a similar journey!” and would like to share that with us.

Thanks and best regards,
Emil Hedevang

7 Likes

Ansys is a big world. You should keep in mind that both Ferrite.jl and Gridap.jl are lower level packages. Think of them as tools to help you write your own solvers. If the types of problems you solve are fairly stable - same physics, just changing geometry/materials/forces, then I don’t think you will have much of a problem.

One issue you might have is creating the mesh. If the geometries are simple, Gmsh.jl is very good. But if the geometry is complex, this can be a pain. You should probably use something like Salome Platform that has a parametric cad and a mesher (and many other things).

Postprocessing is nice and improving. The possibility of accessing the underlying data directly and using a great system like Makie.jl is fantastic sometimes. And we will always have VisIt or Paraview.

Some times the physics might be complicated, from nonlinearity (geometric and material) to things like crack propagation. These things are probably straight forward in Ansys but you might need to implement them in Julia. On the other hand, if something is not implemented in Ansys, you are better off here…

My background is more along the lines of CFD and I have done very little mechanical simulations. In Julia there are several packages doing CFD but none that I’m aware of can use RANS turbulence models and this is a show stopper and many areas. In this case we have to use some dedicated software such as OpenFOAM, SU2 or Code Saturne.

Paulo

1 Like

@Nathan_Boyer was at one point interested in bringing Ansys data into a running Julia.

I use Julia to post-process ANSYS FEA results, but my workflow is still pretty simplistic. I export “Solution” results from ANSYS as a CSV. Then I read those CSVs into Julia to compute some quantities and make some plots: either from the largest stress/strain in the model or from stress/strain along an ANSYS “Path” through a section of the model.

I haven’t actually explored any finite element packages in Julia yet. I have aspirations of doing more complex post-processing like iterating some calculation on slices of the mesh, but that is realistically a long way off. I’ve done hardly any coding at all the last 6 months.

I am very interested in this topic though and what others are doing in this space.

There are some related discussions here and here and here

I would note that a major part of what goes into getting useful results from FEA is data preparation. Solvers: not really a problem, and Julia solvers are already as capable as most commercial products. However, I don’t see in Julia the pre-processing step yet. It is a mountain of work. The Code_Aster/Salome Meca is great for this, and rewriting the pre-processing/ management of models in Julia is not very attractive. On the other hand, rewriting the standard solvers in that framework in Julia would be pretty much pointless (they are standard, after all).

My point? If you want to replace your Ansys workflows with free software, you should probably be looking at Code_Aster/Salome Meca.

Thank you for all your replies! I will carefully read all the links your provided.