[Gmsh] Different element sizes in different spatial directions?

Hanieh Mirzaee mirzaee at cs.utah.edu
Wed Jan 11 18:37:40 CET 2012


Martin,

Not sure if you have seen the previous posts recently, but I have a very 
similar problem to yours. The mesh you would like to generate is an 
"anisotropic unstructured grid". I haven't yet found a solid way for it 
in gmsh. Hopefully someone will comment on this.

Hanieh

On 1/11/2012 5:40 AM, Martin Meyer wrote:
> Hi Ruth,
>
> thanks for that, this works fine as I expected. However it would be 
> better if the values I declare for the step sizes in x and z direction 
> could be more like "guidelines" for gmsh, so that the resulting mesh 
> is not a regular, structured one as the mesh that is created by your 
> script. I don't know if it's possible for example to shift each of the 
> calculated internal nodes, by adding or subtracting some random number 
> to/from the coordinates (the random number in each direction could for 
> example be 10% of the suggested "guideline" step size)?
>
> Regards,
> Martin
>
>
> Zitat von "Ruth V. Sabariego" <r.sabariego at ulg.ac.be>:
>
>> Try this:
>> a = 100 ;
>> lc1 = 10 ;
>> lc2 = 1 ;
>>
>> Point(1) = {0,0,0,lc1};
>> Point(2) = {a,0,0,lc1};
>>
>> Line(1) = {1,2};
>>
>> Extrude {0, a, 0} {
>>   Line{1}; Layers{a/lc2};
>> }
>>
>> Regards,
>> 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 10 Jan 2012, at 13:48, Martin Meyer wrote:
>>
>>> Hi,
>>>
>>> I'm pretty new to gmsh, and so far I haven't succeeded in creating  
>>> a mesh with different element sizes in different spatial directions 
>>>  (for instance a 100m*100m square with average element sizes of 10m 
>>>  in x direction and 1m in y direction).
>>> Is this possible, and if so, can you show me how to do that (either 
>>>  script or GUI)?
>>>
>>> Thanks in advance for your thoughts,
>>> Martin
>>>
>>> _______________________________________________
>>> gmsh mailing list
>>> gmsh at geuz.org
>>> http://www.geuz.org/mailman/listinfo/gmsh
>>
>>
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh