Hi,
as promised here is a code to generate geo files in several stages,
-using regex hacks to pass through them physical entities
-at step import time, so the title of the thread.
 
(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.  )
 
https://github.com/teobo/heatbridge/blob/1517842a54dd9545aa67a58a612fd5c16887fcf9/pub/sourcesfc/pp_config_script1.py
 
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... 
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.) 
 
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! 
 
 
Thanks in advance and regards
 
30.12.2015, 12:04, "teobo" <ananim343...@yandex.com>:
Hi,
-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.
-And I just sketch it here, because in the meanwhile I go coding it with freecad/python.
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. -
-Furthermore I may note, that I use gmsh from ubuntu 14.04. version 2.8.3, which might be the reason for the inconveniences.
So that is the way(2d only):
 
0) create a compound step0 in FreeCAD and add vertices, e.g. https://github.com/teobo/heatbridge/blob/master/pub/sourcesfc/pointtopost.py#L210
1) generate 1.geo, with merge 1.step and print 2.geo in it, execute it. (gmsh 1.geo -)
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)
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. 

Mesh.Format = 1; // msh export
Mesh.SaveElementTagType = 2; //pe export functioning with msh
Mesh.SaveGroupsOfNodes = 1; //unv export functioning not verified yet.
Mesh.SaveAll = 0;

Save "mymesh.msh";

4) convert .msh to elmer mesh.* with ElmerGrid and load it to ElmerGUI or Elmer solver directly. Result: PEs are there.
 
Well, that would be my best known, hacky tool chain, juggling with at least 3 .geo-files and the newly sorted lines.
If this might not be intended, I will be glad for some correction, as said. For any comments, too. 
 
Thanks in advance
 
 
 
28.12.2015, 18:39, "Bernd Hahnebach" <g...@b75.ch>:

Thanks, very much for the explanation. In stuctural enigeering the
workflow is different. All constraints and the materials are defined
and saved inside the geometry.

Bernd


Zitat von Theler German Guillermo <gthe...@cites-gss.com>:

 wrong guess

 physical entities are sets of geometric entities designed in order
 to pass information such as materials and/or boundary conditions to
 a solver.

 say you have two cylinders one on top on another and you want to
 solve the heat tranfer equation. You wold then define for example
 two volumetric physical entities one for each volume and name or
 number them, and from the solver side you decide one is copper and
 one is steel. Then you would define say three surface physical
 entities, one for the upper suface, one for the lower one and one
 for the two curved surfaces and again name or number them. Then from
 the solver side yoy can say "fix the temp at 200 at upper, fix the
 temp at 100 at lower and set a convection BC at curved."

 hope my answer was clear.

 I wish I already finished some annotated examples of applications of
 a FEM solver I am writing using Gmsh-generated grids to further
 illustrate the point.


 Sent from my Samsung device


 -------- Original message --------
 From: teobo <ananim343...@yandex.com>
 Date: 19/12/2015 03:13 (GMT-03:00)
 To: gmsh@geuz.org
 Subject: Re: [Gmsh] Fwd: STEP to .geo conversion problem

 Hi Bernd,
  What is a Physical entity?

 guess it is a node that is a topo point and a body point as well.
 Guess it is about double nodes and double cell edges.
 So control the clean conversion of compound step to geo - is nicer
 then cleaning up the whole doubles afterwards, if at all.
 ..


 18.12.2015, 22:06, "Bernd Hahnebach" <g...@b75.ch>:
   Hello. It would be nice to be able to define the Physical entities in
   FreeCAD and have them recognized by Gmsh, but I don't know how
 to do that.

   What I do from FreeCAD is export each physical surface as a separate BRep
   file and merge them in Gmsh and define the contained volume there. Not
   ideal, but this works.
 He, he I like juggling faces. But do not really understand the
 advantage over just exporting merged compounds?

 Regards
  _______________________________________________
  gmsh mailing list
  gmsh@geuz.org
  http://www.geuz.org/mailman/listinfo/gmsh

 _______________________________________________
 gmsh mailing list
 gmsh@geuz.org
 http://www.geuz.org/mailman/listinfo/gmsh
 ________________________________
 Imprima este mensaje sólo si es absolutamente necesario.
 Para imprimir, en lo posible utilice el papel de ambos lados.
 El Grupo Sancor Seguros se compromete con el cuidado del medioambiente.



 ************AVISO DE CONFIDENCIALIDAD************

 El Grupo Sancor Seguros comunica que:

 Este mensaje y todos los archivos adjuntos a el son para uso
 exclusivo del destinatario y pueden contener información
 confidencial o propietaria, cuya divulgación es sancionada por ley.
 Si usted recibió este mensaje erróneamente, por favor notifíquenos
 respondiendo al remitente, borre el mensaje original y destruya las
 copias (impresas o grabadas en cualquier medio magnético) que pueda
 haber realizado del mismo. Todas las opiniones contenidas en este
 mail son propias del autor del mensaje. La publicación, uso, copia o
 impresión total o parcial de este mensaje o documentos adjuntos
 queda prohibida.

 Disposición DNDP 10-2008. El titular de los datos personales tiene
 la facultad de ejercer el derecho de acceso a los mismos en forma
 gratuita a intervalos no inferiores a seis meses, salvo que acredite
 un interés legítimo al efecto conforme lo establecido en el artículo
 14, inciso 3 de la Ley 25.326. La DIRECCIÓN NACIONAL DE PROTECCIÓN
 DE DATOS PERSONALES, Organo de Control de la Ley 25.326, tiene la
 atribución de atender las denuncias y reclamos que se interpongan
 con relación al incumplimiento de las normas sobre la protección de
 datos personales.




,

_______________________________________________
gmsh mailing list
gmsh@geuz.org
http://www.geuz.org/mailman/listinfo/gmsh

_______________________________________________
gmsh mailing list
gmsh@geuz.org
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to