Looking for a way to build a simple 2D and 3D CAE Pre- and Post-processor

lokitkhemka

CAD practitioner
Hi,
I am looking for a very simple 2D and 3D CAE Pre- and Post-processor. For this reason, I am learning OpenCASCADE. Can anyone point to some resources and libraries for this as OpenCASCADE seems too low-level for my purposes?


Thank you.

-Lokit Khemka.
 
Last edited by a moderator:

lokitkhemka

CAD practitioner
Salome-project seems great for this purpose. But, can I use it as an API? I tried its documentation and almost all examples are geared towards using the GUI.

EDIT: Also, I want to do it to learn. Because it is fun to do things that are hard.
 

Quaoar

Administrator
Staff member
Hi,
I am looking for looking a very simple 2D and 3D CAE Pre- and Post-processor . For this reason, I am learning OpenCASCADE. Can anyone point to some resources and libraries for this as OpenCASCADE seems too low-level for my purposes?


Thank you.

-Lokit Khemka.
A good reference to Salome from @Jojain, but that would be hard to decompose onto building blocks. Why wouldn't you start from a "design document" explaining what the future system is going to be capable of and how you generally see it? That's something gamedevs use to do when they start new game projects. It's called GDD (Game Design Document), but you can simply call it a "Requirements" document :)

Then we will see which technologies you might need as apparently OpenCascade alone is not enough.
 

lokitkhemka

CAD practitioner
Basically, I will be needing the ability to:

1. Draw arbitrary 2d polygons with the ability to set arbitrary loads and properties (such as boundary conditions and water levels , water pressure, etc.) to its surfaces and also define its material properties.
2. Ability draw some 2d closed surfaces (i.e., tunnels) within the domain, which represents the material removed from the domain.
3. Ability to extrude the 2d domain.
4. Ability to define multiple types of one dimensional (usually linear or piecewise linear) elements in the domain.
5. Ability to mesh the 2d and 3d domains.

For reference, I am trying to replicate the functionality of the software featured in the video:

(for 2d)

(for 3d)
 

Quaoar

Administrator
Staff member
@lokitkhemka yeah, I know these guys. You should take into account that there's a huge amount of user interface to develop to nicely support this kind of interaction. Not to speak about the solver and mesh generator (well, something like GMSH can do the job). Not sure about Optum, but I think they have their own in-house finite element solver. Do you know the details?

As for the front-end, it's clearly Qt, then you might want to plug VTK to have all sorts of pre-implemented post-processing capabilities. For the geometric part, OpenCascade will serve you well. There are no finite elements in OpenCascade's data model, but it's not hard to implement them from scratch (it's way less effort than for implementing B-rep).

If I were you, I would start from the solver and mesh generator, maybe leaving all geometric constructions to some scripting engine. This way you'll not spend much time on UI/UX and you will end up with an MVP faster. UI/UX is tons of work, even if you start from something like Salome or Analysis Situs.
 

Zoltan

Looking around for some CAD
Hi @lokitkhemka,

I used Salome both from the GUI and its Python API to do things programmatically, and I believe that all five requirements can be fulfilled in Salome. Some details:

1. Drawing polygons is very easy: just form a closed wire from a set of points. I am not sure if you can assign loads or material properties to regions. However, you can give names to boundary parts and then when you export the mesh to a file (.med can be read by Gmsh), you can associate loads and material properties in the FE software of your choice.
2. and 3. Yes, these are possible.
4. Simplex as well as quad elements are supported in Salome by providing an interface to robust mesh generators. Geometrically linear and quadratic elements are available in Salome.
5. You can mesh 1D, 2D and 3D domains. Moreover, you can choose different mesh generators and algorithms for constructing the 1D mesh, the 2D mesh and the 3D mesh, giving you powerful control over the meshing process. You can even create submeshes so that you can refine or coarsen parts of your mesh. I highly recommend you the Netgen plugin, which generates a high-quality mesh. If further mesh improvement is necessary, you could use Mmg.

Hope it helps.
 

lokitkhemka

CAD practitioner
@lokitkhemka yeah, I know these guys. You should take into account that there's a huge amount of user interface to develop to nicely support this kind of interaction. Not to speak about the solver and mesh generator (well, something like GMSH can do the job). Not sure about Optum, but I think they have their own in-house finite element solver. Do you know the details?

As for the front-end, it's clearly Qt, then you might want to plug VTK to have all sorts of pre-implemented post-processing capabilities. For the geometric part, OpenCascade will serve you well. There are no finite elements in OpenCascade's data model, but it's not hard to implement them from scratch (it's way less effort than for implementing B-rep).

If I were you, I would start from the solver and mesh generator, maybe leaving all geometric constructions to some scripting engine. This way you'll not spend much time on UI/UX and you will end up with an MVP faster. UI/UX is tons of work, even if you start from something like Salome or Analysis Situs.
I have the fair bit of expertise in developing finite element solver, it is something I have spent quite a lot of time working on it. My issue was with the geometry modelling of the domain, meshing and visualization of results. So, in summary, I have a few options:

1. Qt for the user interface.
2. OpenCascade for geometric modelling and VTK for visualization.
3. Salome, Gmsh for the complete API for pre and post processing.

EDIT: @Zoltan I found literally no documentation of installing salome as a package. Instead, salome's documentation seems really vague about how to create python apps with salome. If you know of any, I would be grateful.
 
Last edited:
Top