# Better Tetra4(C3D4) to Tetra10(C3D10) converter tool?

**URL:** <https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708>\
**Category:** Uncategorized\
**Created:** [April 24, 2025, 7:00am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708 "2025-04-24T07:00:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonstudio](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leonstudio](https://calculix.discourse.group/u/leonstudio)\
**Post date:** [April 24, 2025, 7:00am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/1 "2025-04-24T07:00:20Z")

</div>

Hi, everyone! Does anybody have or know a tool that can convert C3D4 element to C3D10 in the format of calculix or abaqus inp file? I have wroten a fortran program that can work correctly, but the performance is worse, it’s too slow for me. Converting about 90000 C3D4 elements will cost about 5min on my laptop (ThinkPad P15 Gen2 with 32GB Memory) !

So, I am looking for a better tool that can convert elements to second order faster. Better can be call for use in other program like fortran etc.

Thanks for all your help!

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [April 24, 2025, 7:15am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/2 "2025-04-24T07:15:50Z")

</div>

Gmsh should be able to do it with the `SetOrder 2` command.

---

<div class="post-metadata">

**Author:** ![leonstudio](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leonstudio](https://calculix.discourse.group/u/leonstudio)\
**Post date:** [April 24, 2025, 7:41am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/3 "2025-04-24T07:41:43Z")

</div>

> [@Calc\_em](#):
>
> Gmsh should be able to do it with the `SetOrder 2` command.

Can you explain it in more detail? I am not very familiar with gmsh. My mesh data is a “.vol” file generated by calling netgen in my fortran program then I read the node and element information from the vol file.

Can gmsh convert directly through the “vol” file, or do I need to convert it to “.msh” format first?

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [April 24, 2025, 2:22pm UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/4 "2025-04-24T14:22:59Z")

</div>

it can be opening in CGX and typing command `mids` to convert to/from any quadratic element

---

<div class="post-metadata">

**Author:** ![leonstudio](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leonstudio](https://calculix.discourse.group/u/leonstudio)\
**Post date:** [April 25, 2025, 1:19am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/5 "2025-04-25T01:19:44Z")

</div>

Thank you！ I’ll try that. Now I solved the problem using the method that @Calc_em mentioned above by calling gmsh. Because my inp file is writen in fix format, using cgx I need to change it to free format. I’ll try it later.

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [April 25, 2025, 7:22pm UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/6 "2025-04-25T19:22:19Z")

</div>

Netgen vol mesh format also can be read by CGX, then setting to quadratic as previously. described. However, calling to generate quadratic element seems to be possible directly in Netgen, but maybe another reason to not to use.

---

<div class="post-metadata">

**Author:** ![leonstudio](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leonstudio](https://calculix.discourse.group/u/leonstudio)\
**Post date:** [April 27, 2025, 12:19am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/7 "2025-04-27T00:19:18Z")

</div>

> [@xyont](#):
>
> However, calling to generate quadratic element seems to be possible directly in Netgen, but maybe another reason to not to use.

Yes, Netgen can generate quadratic element, but the midside nodes are always on the geometry, sometimes resulting negative jacob in the fillter corner. So I need to change the element order by myself.

By the way, could the “vol” file be read into cgx and use “mids” command automaticlly or in a bash mode? Just don’t neet to type conmmand in the cgx window.

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [April 27, 2025, 4:50am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/8 "2025-04-27T04:50:13Z")

</div>

> [@leonstudio](#):
>
> but the midside nodes are always on the geometry, sometimes resulting negative jacob in the fillter corner

maybe mesh size setting is too coarse cause of this problem.

CGX is script based parametric modeling for automation, all command lists can be defined in single file.

---

<div class="post-metadata">

**Author:** ![teofil75](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/teofil75/32/3276_2.png) [@teofil75](https://calculix.discourse.group/u/teofil75)\
**Post date:** [April 27, 2025, 6:36am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/9 "2025-04-27T06:36:29Z")

</div>

Which ForTran compiler did you use? In the past I wrote many ForTran codes for different purpose and the efficiency was every time result in a good performance even in huge mesh files

ALex

---

<div class="post-metadata">

**Author:** ![leonstudio](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leonstudio](https://calculix.discourse.group/u/leonstudio)\
**Post date:** [April 27, 2025, 7:52am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/10 "2025-04-27T07:52:31Z")

</div>

I use gfortran.  
May I ask you to share the code? That will be great helpful!

---

<div class="post-metadata">

**Author:** ![vicmw](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@vicmw](https://calculix.discourse.group/u/vicmw)\
**Post date:** [April 28, 2025, 1:05am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/11 "2025-04-28T01:05:51Z")

</div>

It’s probably not the compiler but an O(n^2) algorithm like searching for available node numbers for every element.

---

<div class="post-metadata">

**Author:** ![leonstudio](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@leonstudio](https://calculix.discourse.group/u/leonstudio)\
**Post date:** [April 28, 2025, 2:14am UTC](https://calculix.discourse.group/t/better-tetra4-c3d4-to-tetra10-c3d10-converter-tool/2708/12 "2025-04-28T02:14:27Z")

</div>

Yes, it is the algorithm reason.
