<div><div>Hi,</div><div>as promised here is a code to generate geo files in several stages,</div><div>-using regex hacks to pass through them physical entities</div><div>-at step import time, so the title of the thread.</div><div> </div><div>(This means, too, one could pass-by expensive get-nodes-from-face-routines such as in (current?) freecad fem and exporting to .inp directly gets into reach. Well, seen it as an additional, optional offer for its users.  )</div><div> </div><div><a href="https://github.com/teobo/heatbridge/blob/1517842a54dd9545aa67a58a612fd5c16887fcf9/pub/sourcesfc/pp_config_script1.py">https://github.com/teobo/heatbridge/blob/1517842a54dd9545aa67a58a612fd5c16887fcf9/pub/sourcesfc/pp_config_script1.py</a></div><div> </div><div>It is pretty unstructured plain script, cause I am still do prototyping with it, however, it is in use already doing convergence over mesh density tests with elmer. (Maybe someday apply structured programming... </div><div><div>You can at least use this as pseudo code. ( Anyway, if you dare to install it, follow the readme and hit "42" at pointtopoint button as seen in latest screen shot.) </div><div> </div></div><div>Anyway, still in search, if there might be a gmsh builtin interface for scripted meshing, found the python interface and the onelab.py. So feel invited to nag, on how it can be done better! </div><div> </div><div> </div><div>Thanks in advance and regards</div></div><div> </div><div>30.12.2015, 12:04, "teobo" <ananim343297@yandex.com>:</div><blockquote type="cite"><div>Hi,</div><div>-think I found one "secret path" for adding pe's _before meshing, in order to  use it for rapid remeshing at reaching a given solving accuracy.</div><div>-And I just sketch it here, because in the meanwhile I go coding it with freecad/python.</div><div>And, yes, that is the purpose of this early post, I would be really glad for any "know better", early guiding approach while inventing the wheel. -</div><div>-Furthermore I may note, that I use gmsh from ubuntu 14.04. version 2.8.3, which might be the reason for the inconveniences.</div><div>So that is the way(2d only):</div><div> </div><div>0) create a compound step0 in FreeCAD and add vertices, e.g. <a href="https://github.com/teobo/heatbridge/blob/master/pub/sourcesfc/pointtopost.py#L210">https://github.com/teobo/heatbridge/blob/master/pub/sourcesfc/pointtopost.py#L210</a></div><div>1) generate 1.geo, with merge 1.step and print 2.geo in it, execute it. (gmsh 1.geo -)</div><div>2) append the line "coherence;" to 2.geo and "print 3.geo;", execute it (elimination of doubles, does not work if placed in 1.geo)</div><div>3) parse 3.geo: faces should (hopefully) be in order of the compound step, but lines order had recently altered due to elimination. So: identify lines by something like bounding box center, generate pe's and append it to 3.geo, together with mesh options, export it to .msh. </div><div><p>Mesh.Format = 1; // msh export<br />Mesh.SaveElementTagType = 2; //pe export functioning with msh<br />Mesh.SaveGroupsOfNodes = 1; //unv export functioning not verified yet.<br />Mesh.SaveAll = 0;</p><p>Save "mymesh.msh";</p></div><div>4) convert .msh to elmer mesh.* with ElmerGrid and load it to ElmerGUI or Elmer solver directly. Result: PEs are there.</div><div> </div><div>Well, that would be my best known, hacky tool chain, juggling with at least 3 .geo-files and the newly sorted lines.</div><div>If this might not be intended, I will be glad for some correction, as said. For any comments, too. </div><div> </div><div>Thanks in advance</div><div> </div><div> </div><div> </div><div>28.12.2015, 18:39, "Bernd Hahnebach" <<a href="mailto:gmsh@b75.ch">gmsh@b75.ch</a>>:</div><blockquote type="cite"><p>Thanks, very much for the explanation. In stuctural enigeering the <br />workflow is different. All constraints and the materials are defined <br />and saved inside the geometry.<br /><br />Bernd<br /><br /><br />Zitat von Theler German Guillermo <<a href="mailto:gtheler@cites-gss.com">gtheler@cites-gss.com</a>>:<br /><br /></p><blockquote> wrong guess<br /><br /> physical entities are sets of geometric entities designed in order <br /> to pass information such as materials and/or boundary conditions to <br /> a solver.<br /><br /> say you have two cylinders one on top on another and you want to <br /> solve the heat tranfer equation. You wold then define for example <br /> two volumetric physical entities one for each volume and name or <br /> number them, and from the solver side you decide one is copper and <br /> one is steel. Then you would define say three surface physical <br /> entities, one for the upper suface, one for the lower one and one <br /> for the two curved surfaces and again name or number them. Then from <br /> the solver side yoy can say "fix the temp at 200 at upper, fix the <br /> temp at 100 at lower and set a convection BC at curved."<br /><br /> hope my answer was clear.<br /><br /> I wish I already finished some annotated examples of applications of <br /> a FEM solver I am writing using Gmsh-generated grids to further <br /> illustrate the point.<br /><br /><br /> Sent from my Samsung device<br /><br /><br /> -------- Original message --------<br /> From: teobo <<a href="mailto:ananim343297@yandex.com">ananim343297@yandex.com</a>><br /> Date: 19/12/2015 03:13 (GMT-03:00)<br /> To: <a href="mailto:gmsh@geuz.org">gmsh@geuz.org</a><br /> Subject: Re: [Gmsh] Fwd: STEP to .geo conversion problem<br /><br /> Hi Bernd,<br /><blockquote>  What is a Physical entity?</blockquote><br /> guess it is a node that is a topo point and a body point as well.<br /> Guess it is about double nodes and double cell edges.<br /> So control the clean conversion of compound step to geo - is nicer <br /> then cleaning up the whole doubles afterwards, if at all.<br /> ..<br /><br /><br /> 18.12.2015, 22:06, "Bernd Hahnebach" <<a href="mailto:gmsh@b75.ch">gmsh@b75.ch</a>>:<br /><blockquote><blockquote>   Hello. It would be nice to be able to define the Physical entities in<br />   FreeCAD and have them recognized by Gmsh, but I don't know how <br /> to do that.</blockquote></blockquote><br /><blockquote><blockquote>   What I do from FreeCAD is export each physical surface as a separate BRep<br />   file and merge them in Gmsh and define the contained volume there. Not<br />   ideal, but this works.</blockquote></blockquote> He, he I like juggling faces. But do not really understand the <br /> advantage over just exporting merged compounds?<br /><br /> Regards<br /><blockquote>  _______________________________________________<br />  gmsh mailing list<br />  <a href="mailto:gmsh@geuz.org">gmsh@geuz.org</a><br />  <a href="http://www.geuz.org/mailman/listinfo/gmsh">http://www.geuz.org/mailman/listinfo/gmsh</a></blockquote><br /> _______________________________________________<br /> gmsh mailing list<br /> <a href="mailto:gmsh@geuz.org">gmsh@geuz.org</a><br /> <a href="http://www.geuz.org/mailman/listinfo/gmsh">http://www.geuz.org/mailman/listinfo/gmsh</a><br /> ________________________________<br /> Imprima este mensaje sólo si es absolutamente necesario.<br /> Para imprimir, en lo posible utilice el papel de ambos lados.<br /> El Grupo Sancor Seguros se compromete con el cuidado del medioambiente.<br /><br /><br /><br /> ************AVISO DE CONFIDENCIALIDAD************<br /><br /> El Grupo Sancor Seguros comunica que:<br /><br /> Este mensaje y todos los archivos adjuntos a el son para uso <br /> exclusivo del destinatario y pueden contener información <br /> confidencial o propietaria, cuya divulgación es sancionada por ley. <br /> Si usted recibió este mensaje erróneamente, por favor notifíquenos <br /> respondiendo al remitente, borre el mensaje original y destruya las <br /> copias (impresas o grabadas en cualquier medio magnético) que pueda <br /> haber realizado del mismo. Todas las opiniones contenidas en este <br /> mail son propias del autor del mensaje. La publicación, uso, copia o <br /> impresión total o parcial de este mensaje o documentos adjuntos <br /> queda prohibida.<br /><br /> Disposición DNDP 10-2008. El titular de los datos personales tiene <br /> la facultad de ejercer el derecho de acceso a los mismos en forma <br /> gratuita a intervalos no inferiores a seis meses, salvo que acredite <br /> un interés legítimo al efecto conforme lo establecido en el artículo <br /> 14, inciso 3 de la Ley 25.326. La DIRECCIÓN NACIONAL DE PROTECCIÓN <br /> DE DATOS PERSONALES, Organo de Control de la Ley 25.326, tiene la <br /> atribución de atender las denuncias y reclamos que se interpongan <br /> con relación al incumplimiento de las normas sobre la protección de <br /> datos personales.<br /><br /></blockquote><p><br /><br /><br /></p></blockquote>,<p>_______________________________________________<br />gmsh mailing list<br /><a href="mailto:gmsh@geuz.org">gmsh@geuz.org</a><br /><a href="http://www.geuz.org/mailman/listinfo/gmsh">http://www.geuz.org/mailman/listinfo/gmsh</a></p></blockquote>