FreeCAD Logo FreeCAD 1.0
  • English Afrikaans Arabic Belarusian Catalan Czech German Greek Spanish Spanish Basque Finnish Filipino French Galician Croatian Hungarian Indonesian Italian Japanese Kabyle Korean Lithuanian Dutch Norwegian Bokmal Polish Portuguese Portuguese Romanian Russian Slovak Slovenian Serbian Swedish Turkish Ukrainian Valencian Vietnamese Chinese Chinese
  • Features
  • Download
  • Blog
  • Documentation
    Documentation index Getting started Users documentation The FreeCAD manual Workbenches documentation Python coding documentation C++ coding documentation Tutorials Frequently asked questions Privacy policy About FreeCAD
  • Contribute
    How to help Sponsor Report a bug Make a pull request Jobs and funding Contribution guidelines Developers handbook Translations
  • Community
    Code of conduct Forum The FPA GitHub GitLab Codeberg Mastodon Matrix IRC IRC via Webchat Gitter Discord Reddit Twitter Facebook LinkedIn Calendar
  • ♥ Donate

Donate

$
SEPA Information
Please set up your SEPA bank transfer to:
Beneficiary: The FreeCAD project association
IBAN: BE04 0019 2896 4531
BIC/SWIFT: GEBABEBBXXX
Bank agency: BNP Paribas Fortis
Address: Rue de la Station 64, 1360 Perwez, Belgium

While Stripe doesn't support monthly donations, you can still become a sponsor! Simply make a one-time donation equivalent to 12 months of support, and you'll gain access to the corresponding sponsoring tier. It's an easy and flexible way to contribute.

If you are not sure or not able to commit to a regular donation, but still want to help the project, you can do a one-time donation, of any amount.

Choose freely the amount you wish to donate one time only.

You can support FreeCAD by sponsoring it as an individual or organization through various platforms. Sponsorship provides a steady income for developers, allowing the FPA to plan ahead and enabling greater investment in FreeCAD. To encourage sponsorship, we offer different tiers, and unless you choose to remain anonymous, your name or company logo will be featured on our website accordingly.

from 1 USD / 1 EUR per month. You will not have your name displayed here, but you will have helped the project a lot anyway. Together, normal sponsors maintain the project on its feet as much as the bigger sponsors.

from 25 USD / 25 EUR per month. Your name or company name is displayed on this page.

from 100 USD / 100 EUR per month. Your name or company name is displayed on this page, with a link to your website, and a one-line description text.

from 200 USD / 200 EUR per month. Your name or company name and logo displayed on this page, with a link to your website and a custom description text. Companies that have helped FreeCAD early on also appear under Gold sponsors.

Instead of donating each month, you might find it more comfortable to make a one-time donation that, when divided by twelve, would give you right to enter a sponsoring tier. Don't hesitate to do so!

Choose freely the amount you wish to donate each month.

Please inform your forum name or twitter handle as a notein your transfer, or reach to us, so we can give you proper credits!


GuiCommand: Name: CfdOF CFD Mesh MenuLocation: CfdOF , CFD Mesgh‏‎ Workbenches: CfdOF_Workbench

CfdOF CFD Mesh

Description

The CFD Mesh dialogue panel is used to build the mesh from the geometry.

Usage

Once the Analysis Container has been created, the CFD Mesh dialogue panel can be added to the tree in the following ways:

  1. Select the Geometry that you wish to mesh.

  2. Both the button and the CfdOF → CFD Mesh‏‎ menu option, become available.

  3. Click on either the:

    **<img src="https://raw.githubusercontent.com/FreeCAD/FreeCAD-documentation/master/wiki/images/CfdOF_CFD_Mesh.svg" width=16px>

    **

    button or,
    • CfdOF → CFD Mesh‏‎

      menu option.

  4. The CFD Mesh dialogue panel will open.

  5. **\[Geometry Name\]\_Mesh** will be created in the tree.

Options

The dialogue panel offers the following settings:

CfdOF CFD Mesh Dialog Panel

Mesh Parameters

Mesh Utility dropdown box gives the following options:

  • cfMesh

: cfMesh is an open-source, extensible library for automatic mesh generation. cfMesh supports both 3D and 2D meshes and can generate:

  • Hex dominant 3D meshes

  • Quad dominant 2D meshes

  • Tetrahedral dominant 3D meshes

  • Polyhedral dominant 3D meshes

  • gmsh (tetrahedral)

  • gmsh (polyhedral)

: Gmsh is an open source 3D finite element mesh generator.

  • snappyHexMesh

: snappyHexMesh is an automatic split hex mesher which refines and snaps to surface. It generates 3D meshes containing hexahedra and split-hexahedra from a triangulated surface geometry in Stereolithography (STL) format. snappyHexMesh is used for complex geometries.

Base element size input box

: The Base, or Background, Mesh is the initial mesh, without refinement. If left as 0, it will default to 2 % of bounding box characteristic length. e.g. a 10 mm square cube will have boundary box characteristics of (10^2^ + 10^2^ + 10^2^)^0.5^ of which 2% is 0.35mm.

snappyHexMesh parameters

The following parameters are only available when the snappyHexMesh Mesh Utility has been selected.

CfdOF CFD Mesh Dialog Panel snappyHexMesh

Point in mesh

: Enter a location vector inside the region to be meshed, in the form x, y, z. This is used to identify whether the geometry is to be meshed on the outside, as in the case of fluid flowing over a pipe, or the inside, as in fluid flowing through a pipe. The '''Search''' button will try to locate a position in the region to be meshed.

No. of cells between levels & Relative edge refinement

: The base element size has already been defined above. Volume or surface refinement is achieved by splitting the base cells into 4 quads for 2D or 8 hexes for 3D models. The figure below shows the base cell being split into 4 quads at the first split n=1 and then each new cell being again split into 4 quads on the second spit, n=2.

CfdOF Mesh Cell Split

: The Relative edge refinement input box accepts values between 0.001 and 1. It defines the mesh size relative to the starting background mesh. The split can be calculated by 1/(2\^n-1) e.g. for n=2, the relative edge refinement value is 0.5.

: To achieve a smooth transition between the split cells, ensure that there are a number of cells between consecutive refinement levels. The No. of cells between levels input box accepts integer values above or equal to 1 with a default value of 3.

Mesh Cell Split with refinement level 2

: The above example has a refinement level of n=2 giving a relative edge refinement of 0.5 with 2 cells between consecutive refinement levels.

Edge detection

  • Implicit snaps to automatically detected surface geometric feature edges.
  • Explicit snaps to manually generated feature edges.

Meshing

'''Write mesh case'''

button

: Clicking on the Write mesh case creates the mesh files with the progress being displayed in the Status box.

'''Edit'''

button

: The Edit button opens the directory where the OpenFOAM case files are stored, including the mesh files, generated above, in the constant directory. For more information about these files and directories please visit the UNDER THE HOOD PAGE.

'''Run mesher'''

button

: Clicking on the Run mesher button starts the selected mesher process, with the progress being displayed in the Status box.

'''Stop'''

button

: Used to stop either the Write mesh case or Run mesher processes.

Visualisation

'''Paraview'''

button

: ParaView is an open-source, multi-platform data analysis and visualization application. Clicking on the Paraview button opens the mesher, to allow the mesh to be inspected.

'''Check Mesh'''

button

: Clicking on the Check Mesh button runs the OpenFOAM checkMesh utility. This checks the validity of a mesh and outputs it's result in the reports view area in FreeCAD. It's possible to enlarge this box, by dragging the top of the reports panel up the screen.

'''Load surface mesh'''

button

: Clicking on Load surface mesh displays the mesh on the geometry within FreeCad. It only the displays the mesh on the surface of the geometry and not the internals. For a more detailed inspection of the mesh use ParaView. : Warning! If the message in the Status reads:

:   \"Triangulated representation of the surface mesh is shown - Please use Paraview for full mesh visualisation.\"

: The Load surface mesh image displayed is not fully representative of the mesh and you should view the mesh in ParaView.

'''Clear'''

button

: The Clear button removes the mesh on the geometry within FreeCad.

Status output box

: When clicking '''Write mesh case''' or '''Run mesher''', the progress is displayed in the Status output box, together with any error messages.

  • When '''Write mesh case''' has finished, the last message in the Status output box will be \'Mesh case written successfully\'.
  • When '''Run mesher''' has finished, the last message in the Status output box will be \'Meshing completed\'.

Notes

{{CfdOF Tools navi}}


⏵ documentation index > CfdOF > CfdOF CFD Mesh

This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/CfdOF_CFD_Mesh.md

Get in touch!
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

© The FreeCAD Team. Homepage image credits (top to bottom): ppemawm, r-frank, epileftric, regis, rider_mortagnais, bejant.

This project is supported by: , KiCad Services Corp. and other sponsors

GitHubImprove this page on GitHub