<div dir="ltr">Dear Christophe and Winfried,<div><br></div><div>Thank you so much for your help. The problem has been solved.</div><div><br></div><div>The reason is that LS-DYNA can only read 16 digits, while in the output file of Gmsh some numbers have 17 digits. For example, in my previous email <font color="#000000">0.012499999999976 has 17 digits including the dot, which cannot be read by LS-DYNA. I also found that the 17-digit numbers only happen when its value is close to zero. Then I moved the entire mesh by 1 in all x-, y- and z-coordinates. Then the output file by Gmsh works well for LS-DYNA.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Hope the solution helps the people who might have the same problem.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">Best wishes,</font></div><div><font color="#000000">Xingsheng</font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 20, 2020 at 4:23 AM Winfried Boxleitner <<a href="mailto:winfried.boxleitner@ait.ac.at">winfried.boxleitner@ait.ac.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">dear Christophe,<br>
my awk-script is meant as an example only, howto modify the msh-file<br>
after creation. for users not familiar to commandline tools however, this<br>
is not useful. I personally have no problems with the current format.<br>
remark: until now I only used msh version 2, because this can be used<br>
together with FreeFem.<br>
<br>
<br>
Winfried<br>
<br>
On Fri, 20 Mar 2020, Christophe Geuzaine wrote:<br>
<br>
><br>
><br>
>> On 20 Mar 2020, at 07:59, Winfried Boxleitner <<a href="mailto:winfried.boxleitner@ait.ac.at" target="_blank">winfried.boxleitner@ait.ac.at</a>> wrote:<br>
>><br>
>> dear Xingsheng,<br>
>> if you are used to commandline you can modify my awk-script to fit your needs.<br>
>><br>
>> to format the mesh file use the following command:<br>
>> awk -f pretty_print_msh.awk input.msh > output.msh<br>
>><br>
><br>
> Do you mean that we should use %12.6g in our KEY export?<br>
><br>
> Christophe<br>
><br>
><br>
>> the awk-script is attached<br>
>><br>
>> best regards,<br>
>> Winfried<br>
>><br>
>><br>
>> On Thu, 19 Mar 2020, Xingsheng Sun wrote:<br>
>><br>
>>> Hello All,<br>
>>><br>
>>> I am using Gmsh to generate the mesh file for Ls-dyna. The problem is that<br>
>>> in the key-format file generated by Gmsh, the coordinates of nodes have too<br>
>>> many digits. For instance, in the node information:<br>
>>><br>
>>> *NODE<br>
>>> 22, 0, 0.012499999999976, -0.001<br>
>>> 23, 0, 0.02499999999995, -0.001<br>
>>> 24, 0, 0.037499999999926, -0.001<br>
>>> 25, 0, 0.049999999999907, -0.001<br>
>>><br>
>>> the y-coordinates of nodes 22-25 have 15 digits that cannot be read by<br>
>>> Ls-dyna.<br>
>>><br>
>>> So could any people shed light on how to reduce the number of digits in<br>
>>> Gmsh? I am using command lines, not GUI. Thank you so much in advance.<br>
>>><br>
>>> Best regards,<br>
>>> Xingsheng<br>
>>><br>
>><br>
>><br>
>>  ______________________________________________________________________<br>
>> /<br>
>> | Winfried Boxleitner<br>
>> | Scientist<br>
>> | AIT Austrian Institute of Technology GmbH<br>
>> \______________________________________________________________________<pretty_print_msh.awk>_______________________________________________<br>
>> gmsh mailing list<br>
>> <a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
>> <a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
><br>
> —<br>
> Prof. Christophe Geuzaine<br>
> University of Liege, Electrical Engineering and Computer Science<br>
> <a href="http://www.montefiore.ulg.ac.be/~geuzaine" rel="noreferrer" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br>
><br>
></blockquote></div>