Re: [Gmsh] Variable thickness surface
> On 30 Mar 2020, at 12:57, Julian wrote: > > Hello, > > I am using gmsh for modelling 2D components and I am trying to find out how I > can set a thickness to the plate/shell elements. First I was thinking about > assigning regions of different thicknesses to different physical groups but > by this approach I can specify only a constant value which is not what I need. > > According to this conversation from the mailing list it should be possible. > You can indeed interpolate a function on the 2D mesh; the API allows you to create a "post-processing view" for this quite easily (see e.g. demos/api/view.py). Christophe > Hi Mathieu, > Have a look at the Gmsh Tutorial 7: > http://geuz.org/gmsh/doc/texinfo/gmsh.html#t7_002egeo > HTH > Ruth > Dr. Ir. Ruth V. Sabariego > University of Liege, Electrical Engineering & Computer Science, > Applied & Computational Electromagnetics (ACE), > phone: +32-4-3663737 - fax: +32-4-3662910 - http://ace.montefiore.ulg.ac.be/ > > On 13 Oct 2011, at 12:27, Mathieu ARQUIER wrote: > > Hello, > > First of all, thank you very much for developing GMSH !!! I used it for > several years now as pre-processor to create meshes for my structural > calculation software and it works very well :). > Now, I want to go further and would like to create variable thickness shell > elements. So, I was wondering if there is a way to interpolate a scalar field > inside a 2D meshed surfaced (i.e. the thickness) ? Basically, I want to > define a surface with a variable thickness (let's say I know the value at > some nodes of its border), and, once the meshing has been done, I want to > retrieve the value of the interpolated thickness at each new created nodes > inside the surface in order to define variable thickness shell elements. > Do you see any way to do so ? > Thank you in advance ! > > Best regards, > > Mathieu ARQUIER > Structural Engineer > mathieu.arquier at gmail.com > > I checked the tutorial 7 he referred to. In my opionion this examples > controls the size of the elements by using a *.pos file and not controlling > the thickness. So my question is how I can assign a thickness for example to > a rectangle area as a linear function from 1 to 10 in x-direction and > constant in y-direction? > > Best regards > Julian > ___ > gmsh mailing list > gmsh@onelab.info > http://onelab.info/mailman/listinfo/gmsh — Prof. Christophe Geuzaine University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
Re: [Gmsh] Python API and Spyder
> On 31 Mar 2020, at 11:59, paul francedixhuit wrote: > > Hi > > One would say this is not the "normal" use of the Gmsh API, but for my > developments under Python, I'm always coding under Spyder IDE (and I would > like to continue if possible). > > I've been noticing that when Gmsh GUI needs to be opened (t8.py case for > example), then it becomes not possible to close it and it's necessary to > close Spyder as well (of course it works fine in commande line). > > Can we imagine something like gmsh.close()? > > In addition as I've ever said in a previous post, Gmsh API can be used: > • either by defining the PYTHONPATH as described in the doc (I've > defined it in the .bashrc file) > • either by explicitly implementing it at the beginning of the Python > file (see sys.path.append) > Find some screenshots in attachment > When you call gmsh.fltk.run(), FLTK basically runs a while(1) loop waiting for graphical interface events. To break the loop simply close the Gmsh window. You can also run the event loop yourself in Python: don't call gmsh.fltk.run(), but gmsh.fltk.wait() each time to want to wait for an event. See demos/curstom_gui.py for a complete example. Christophe > Stay at home > > Paul > > ___ > gmsh mailing list > gmsh@onelab.info > http://onelab.info/mailman/listinfo/gmsh — Prof. Christophe Geuzaine University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
Re: [Gmsh] Problem meshing a spur gear
> On 31 Mar 2020, at 19:30, Carlos Fernandes > wrote: > > Dear Gmsh community, > > I am Carlos from Portugal. > > I am working with Gmsh API in order to generate the geometry and > automatically mesh spur and helical gears (with a structured mesh). To do so, > I make use of setTransfiniteCurve which works perfectly for a 2D situation > (see attachement 2D). However, when I extrude the geometry using extrude, one > particular area on the tooth doesn't mesh properly (3D_wrong in attachment). > The weird thing is, if I use any other gear geometry or even helical gears, > the mesh works perfectly both on 2D and 3D. If someone could provide me some > hint... > > Another tricky thing that I am facing is making a rotating pattern of the > mesh already done. My ideia is to be able to generate the amount of gear > teeth according with the type of simulation needs. In certain simulations I > use 1 tooth, in others a variable number of tooth up to all the gear (360º). > Is there a particular tool in Gmsh API that is efficient in perform this kind > of pattern? > In your second picture one can see that the middle-right surface has been split in 2 pieces: you will thus need to adapt the number of nodes on the two-part boundary of the middle surface to make sure that the number of nodes match on the left and right sides. And you will need to specify the corners of the transfinite interpolation manually, as the middle surface has more than 4 points on its boundary. See tutorial/python/t6.py for an example. Christophe > Thank you all. > > Best regards, > Carlos Fernandes > <2D.png><3D_wrong.png>___ > gmsh mailing list > gmsh@onelab.info > http://onelab.info/mailman/listinfo/gmsh — Prof. Christophe Geuzaine University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
Re: [Gmsh] Structured grid for triangular domains
> On 25 Mar 2020, at 20:46, Murilo Henrique Campana Bento > wrote: > > Hi everyone, > > I am trying to create a structured mesh for a simple triangular domain. > However, the generated mesh is not the one I expected. > > The input script (geo) I am using is the following. > > " > Point(1) = {0.0, 0.0, 0.0, 1.0}; > Point(2) = {1.0, 0.0, 0.0, 1.0}; > Point(3) = {1.0, 1.0, 0.0, 1.0}; > > Line(1) = {1, 2}; > Line(2) = {2, 3}; > Line(3) = {3, 1}; > > Line Loop(1) = {1, 2, 3}; > Plane Surface(1) = {1}; > > Transfinite Line {1, 2, 3} = 5; > Transfinite Surface {1} Right; > " > > The mesh I am obtaining is illustrated in Fig01. > The mesh I would expect to obtain is one similar to that presented in Fig02 > (with little right triangles). > Indeed, the transfinite algo does not have this decomposition coded. It should be quite easy to add though: look at Mesh/meshGFaceTransfinite.cpp. Don't hesitate to send a patch or a merge request with the code on our gitlab. Christophe > Thank you all for your help! > Best regards, > > Murilo Bento > ___ > gmsh mailing list > gmsh@onelab.info > http://onelab.info/mailman/listinfo/gmsh — Prof. Christophe Geuzaine University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
Re: [Gmsh] Python API and Spyder
thanks for the answer, "To break the loop simply close the Gmsh window" as I said, I cannot close gmsh (cross or ctrl+q) and I need to close spyder so that gmsh finally closes itself; still trying to figure out why Paul Le mer. 1 avr. 2020 à 11:32, Christophe Geuzaine a écrit : > > > > On 31 Mar 2020, at 11:59, paul francedixhuit wrote: > > > > Hi > > > > One would say this is not the "normal" use of the Gmsh API, but for my > developments under Python, I'm always coding under Spyder IDE (and I would > like to continue if possible). > > > > I've been noticing that when Gmsh GUI needs to be opened (t8.py case for > example), then it becomes not possible to close it and it's necessary to > close Spyder as well (of course it works fine in commande line). > > > > Can we imagine something like gmsh.close()? > > > > In addition as I've ever said in a previous post, Gmsh API can be used: > > • either by defining the PYTHONPATH as described in the doc (I've > defined it in the .bashrc file) > > • either by explicitly implementing it at the beginning of the > Python file (see sys.path.append) > > Find some screenshots in attachment > > > > When you call gmsh.fltk.run(), FLTK basically runs a while(1) loop waiting > for graphical interface events. To break the loop simply close the Gmsh > window. > > You can also run the event loop yourself in Python: don't call > gmsh.fltk.run(), but gmsh.fltk.wait() each time to want to wait for an > event. See demos/curstom_gui.py for a complete example. > > Christophe > > > Stay at home > > > > Paul > > > > > ___ > > gmsh mailing list > > gmsh@onelab.info > > http://onelab.info/mailman/listinfo/gmsh > > — > Prof. Christophe Geuzaine > University of Liege, Electrical Engineering and Computer Science > http://www.montefiore.ulg.ac.be/~geuzaine > > > > ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
[Gmsh] Rotation of Surface in Gmsh
Hi Gmsh Community, Hope you are doing well. I am quite new in Gmsh. I was trying to make a geometry as same in the attached picture. I am able to create both surfaces but was not able make an inclination of the upper surfaces. It can be a silly trick for someone who is well familiar with Gmsh environment. For more information please see the attached picture and geo file. I am kind of stacked here. I would be very grateful to you if I get the solution of that. Please suggest me what can be done to do that. I tried rotate option in the Gmsh but couldn't find any solution so far. Cheers,* Razon* Rotate.geo Description: Binary data ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
Re: [Gmsh] Rotation of Surface in Gmsh
> On 1 Apr 2020, at 12:56, Razon kumar wrote: > > Hi Gmsh Community, > > Hope you are doing well. I am quite new in Gmsh. I was trying to make a > geometry as same in the attached picture. I am able to create both surfaces > but was not able make an inclination of the upper surfaces. It can be a silly > trick for someone who is well familiar with Gmsh environment. > For more information please see the attached picture and geo file. I am kind > of stacked here. I would be very grateful to you if I get the solution of > that. Please suggest me what can be done to do that. I tried rotate option in > the Gmsh but couldn't find any solution so far. Add Rotate{{0,0,1}, {0,2,5}, -Pi/3}{ Surface{2}; } Before the extrude command. I would advise to read the tutorials before sending questions to the list... Christophe > Cheers, > > Razon > > > ___ > gmsh mailing list > gmsh@onelab.info > http://onelab.info/mailman/listinfo/gmsh — Prof. Christophe Geuzaine University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh