Hello everyone, I want to test the new OpenFOAM pressure import feature. I have a *.foam file from my test suite and would like to know how to prepare it for PrePoMax. To compute pressure on Paraview, I need to do the following steps:
Extract the block I want to analyze
Extract the block’s surface
Generate the surface normals on cells
Calculate the scalar product of pressure times normal (equivalent to decomposing pressure in relevant directions i.e. lift and drag pressure)
The last step is integrating the results over the area to get the lift and drag force, however, this probably wouldn’t be useful as the pressure itself can be applied to structural analysis.
Is there any required process like this before importing the *.foam file? And I would appreciate tips on how to import it because when I use the “Open” command there are only *.pmx, *.pmh, and *.frd extensions available, and when I try to use “Import” I don’t see any *.foam extension support as well.
There’s a new load type for this - Imported pressure. Select it and there you can specify the OpenFOAM file from which the pressure distribution will be imported.
First of all, only Acsii OpenFOAM results are supported. Then follow the instructions from FEAanalyst. Be careful about the units and pressure value, which is sometimes given as pressure/density in OpenFOAM. Use the scaling factor to conpensate. After the load is prepared, you can preview it: right click → Preview
Thank you both, now I understand it. Do I need to use the same STL used in the aerodynamic simulation to conduct the structural analysis? It was modeled in CAD as solid for the first case, but the geometry is actually hollow (I used SurfaceFeatureExtract on OpenFOAM).
You can use any geometry in PrePoMax. It can be .stl or .step. The important thing is that it is in the same place in the 3D space as the geometry used in OpenFOAM and that it has the same units of length.
Hello,
Can you tell what is the .foam file content using for prepomax importing?
Point coordinates and pressure magnitudes in text format, one line is one point, separated by comma or space?
or?
We need exact format description.
The OpenFOAM software works not with a single input file as other software but with folders of multiple files. To open such a structure in PrePoMax, a new empty file with a .foam extension must be created in the base OpenFOAM folder (the same procedure is necessary for ParaView). The base folder must contain the mesh in the constant/polymesh folder and result files in folders denoted by numbers 10, 100, 300, 1000, …
Matej, Thank you.
I’s clear now, it will be ok.
One question: scale factor will scale the geometrical sizes or pressure results?
I mean I have an openFoam model in meter, Pa, s, but I have a PrePoMax model is mmNs (MPa).
Or, PrePoMax can consider openFoam units and convert everything into the proper unit system?
The scale factor is used to multiply the values found in OpenFOAM results since pressure is (sometimes) expressed as relative pressure (pressure divided by density, if I remember correctly). So PrePoMax reads the raw numbers stored in p file and then multiplies them with this value.
For the size of the model, there is no scale. The mesh of the OpenFOAM model is read and units in the PrePoMax are assumed. So if the position of the point in OpenFAOM is (0, 1, 0), it is assumed, that this point is on (0 mm, 1 mm, 0 mm) in PrePoMax if the length units are mm or (0 m, 1 m, 0 m) if the length units are m. No scaling is done.
The user may check if the positions and sizes of both models are appropriate by first opening the OpenFOAM results and then copying the geometry to the results (Copy geometry parts to results).
Then, previewing the Imported pressure load is possible by right-clicking it and selecting Preview. In the generated preview, the user may find the applied pressure multiplied by the scale factor and the distances. The distances show the closest distance between the PrePoMax mesh and the OpenFOAM mesh found in the file that was selected under the Imported pressure load. These distances should be small since they are the result of not coincident meshes.
Hello Matej,
OK, so we need to make the models in common system of units, clear, thanks.
I’ve tried to open .foam file to compare results in space with my fea model, but I got the following error message, see the picture:
We performed multi-core analyses in OpenFOAM and were able to read the results. I forgot if there is a command that gathers the results into one folder or something.
Right, there’s that reconstructPar command but I need to figure out how to use it when I’m running OpenFOAM simulations from the CfdOF module in FreeCAD. I just wanted to confirm that PrePoMax can’t read such decomposed results directly.