Documentation
In some instances, the user might be interested in generating mesh in a local environment and use SimScale to apply the simulation setup parameters and perform a simulation. It is possible to upload multiple mesh files to the SimScale Workbench from an external environment. The procedure is similar to uploading a geometry.
Once uploaded, an entity Uploaded Meshes is added to the simulation tree:
Under Uploaded Meshes you should see all the meshes that were uploaded to the Workbench. Select one of them and proceed with the simulation using the ‘Create Simulation’ button.
In order to use uploaded meshes successfully within SimScale, the boundaries of your meshes need to be specified in advance before uploading. All elements (i.e. nodes, edges, faces, or volumes) on which you want to apply boundary conditions or assign a material or other setup parameters must be grouped before the upload.
Currently, SimScale supports two formats for mesh uploads:
Simply select a *.med file and upload it. You may also pack it either as a *.tar.gz file or a *.zip archive.
Meshes with the .med format are most often used for structural simulations, however they may also be used for CFD simulations in SimScale with the following solvers: incompressible, compressible, convective heat transfer, and multiphase.
For demonstration purposes, the following figures show a mesh of a plate created using Salome.
In the figure above, notice how groups were created in Salome for edges, faces, and volumes. These groups will be available in SimScale for you to select when setting up boundary conditions, material assignments, result controls, and more.
As such, a .med mesh must have groups of volumes and faces to successfully import it to SimScale. Furthermore, groups of edges and nodes are optional.
When exporting a .med mesh, keep in mind that only versions 3.0, 3.1, 3.2, and 3.3 are supported.
When importing the .med mesh to SimScale, you may choose to leave the mesh uncompressed, or compress it either as a *.tar.gz file or a *.zip archive.
To upload a mesh in the .foam format, simply pack the constant folder within the OpenFOAM case folder and upload it. The constant folder has to contain the polyMesh folder where the actual mesh files are located. Pack the constant folder either as *.tar.gz file or a *.zip archive before uploading.
All mesh patches of your polyMesh/boundaries file will be pickable so that boundary conditions can be assigned. Here is an example of the contents inside of the constant and polyMesh folders:
After importing the compressed constant folder to SimScale, the .foam mesh will be available for the following solvers: incompressible, compressible, convective heat transfer, and multiphase.
Please note that SimScale uses original OpenFOAM headers as reference when processing imported meshes, therefore if the headers do not follow the correct OpenFOAM format this will cause the mesh import to fail.
This issue often happens when you generate the mesh with an OpenFOAM GUI, and in these cases it is important that you adjust the headers back to the original OpenFOAM format. For example, the image below shows an original OpenFOAM header for the constant/polyMesh/boundary file:
If the header format is wrong, you will have to update it for the boundary file and all other files in the constant folder.
Important
OpenFOAM®’s binary format is not yet supported. Please make sure the mesh is in ASCII format. Hence, please open the file system/controlDict and change the writeFormat entry from binary to ascii.
Figure 8: Adjusting the writeFormat definition to ascii before running the foamFormatConvert utility
Afterward, using OpenFOAM, run the foamFormatConvert utility to convert the binary mesh into an ASCII mesh.
Note that unlike the CAD models, uploaded meshes are not available for downloading from the SimScale platform.
Considering the physics involved and the requirement of geometries the following analysis types may be supported to run simulations on uploaded meshes:
Note that the uploaded meshes cannot be modified and hence CAD mode operations cannot be performed on them.
Last updated: January 20th, 2025
We appreciate and value your feedback.
What's Next
Mesh Uploadpart of: Meshing in SimScale
Sign up for SimScale
and start simulating now