CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Special Topics > Mesh Generation & Pre-Processing

Convert existing gmsh mesh to second order?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2020, 21:51
Default Convert existing gmsh mesh to second order?
  #1
New Member
 
Harris Snyder
Join Date: Aug 2018
Posts: 20
Rep Power: 4
hsnyder is on a distinguished road
Hello everyone,


Quick question about gmsh. Is there a way to take an existing gmsh .msh file, and convert it to second order elements? Specifically, I'm trying to go from 8-point hexahedra (hex8) to 20-point hexahedra (hex20). Ideally, I'd like a command-line solution. I tried this:


Code:
gmsh -o output.msh -format msh2 input.msh -order 2 -0

But it doesn't seem to work - I still get hex8 elements in the output. Is there a way to do this, or does the order need to be set when the mesh is first generated?

Thanks
hsnyder is offline   Reply With Quote

Old   May 17, 2020, 00:46
Default
  #2
New Member
 
Harris Snyder
Join Date: Aug 2018
Posts: 20
Rep Power: 4
hsnyder is on a distinguished road
Answered my own question - you can do it using a gmsh script (i.e. a .geo file).

Code:
Merge "input.msh";

SetOrder 2;

Save "output.msh";

Saving that as "convert.geo", you can then run:

Code:
gmsh convert.geo -0
hsnyder is offline   Reply With Quote

Reply

Tags
gmsh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GeometricField -> mesh() Function Tobi OpenFOAM Programming & Development 10 November 19, 2020 11:33
can you tell me best gradient, pressure & momentum order selection in fluent sanjiiv FLUENT 6 February 14, 2020 06:07
A high order curvilinear mesh generation(converting) tool is strongly recommended! hyperman Mesh Generation & Pre-Processing 0 June 22, 2018 08:04
sliding mesh problem in CFX Saima CFX 45 September 22, 2015 10:53
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 09:03


All times are GMT -4. The time now is 14:41.