<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Jeremy,</div><div><br></div><div>thanks for the help!</div><div><br></div><div><br></div><div>With your pointer I managed to make a beautiful smooth transition of element sizes, by essentially following tutorial 10 :)</div><div>I ended up with:<br></div><div><br></div><div><div>//------------------------------------------------------------------------------------------------------</div><div><br></div></div><div>SetFactory("OpenCASCADE");<br><br>lc = 310;<br><br>chamberCenterDepth = -2000.0;<br>chamberMaxRadius = 1000.0;<br>domainLength = 15000.0;<br><br>// start with a sphere<br>Sphere(1) = {0, 0, -chamberCenterDepth, chamberMaxRadius};<br><br>// flatten it {centerx, centery, centerz} {scale x, scale y, scale z}<br>Dilate {{0, 0, -chamberCenterDepth}, {1,1,0.1}} { Volume{1}; }<br><br>// quarter cylinder<br>Cylinder(2) = {0,0,0,0,0,domainLength,domainLength,0.5*Pi};<br><br>// remove the cavity<br>BooleanDifference(10) = { Volume{2}; Delete; }{ Volume{1}; Delete; };<br><br>Field[1] = Distance;<br>Field[1].NodesList = {7,8};<br>Field[1].NNodesByEdge = 10;<br>Field[1].EdgesList = {8,9};<br><br>Field[2] = Threshold;<br>Field[2].IField = 1;<br>Field[2].LcMin = lc / 5;<br>Field[2].LcMax = lc;<br>Field[2].DistMin = 3000;<br>Field[2].DistMax = 10000;<br><br>Background Field = 2;<br><br>Mesh.CharacteristicLengthExtendFromBoundary = 0;<br>Mesh.CharacteristicLengthFromPoints = 0;<br>Mesh.CharacteristicLengthFromCurvature = 0;<br><br></div><div><div>//------------------------------------------------------------------------------------------------------</div><div><br></div><div>I still have to figure out how to mesh the outer curved surface of the cylinder, as gmsh does not respond well to RemeshParametrization which I tried following discussion: <a href="http://onelab.info/pipermail/gmsh/2017/011597.html">http://onelab.info/pipermail/gmsh/2017/011597.html</a><br></div><div>But that is something for me to figure out :-)<br></div><div><br></div><div>Best wishes and thanks again</div><div><br></div><div>Lukas<br></div></div><div dir="ltr"><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 24, 2019 at 11:19 PM Jeremy Theler <<a href="mailto:jeremy@seamplex.com">jeremy@seamplex.com</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">Hello Lukas<br>
<br>
On Wed, 2019-04-24 at 10:46 +0200, Lukas van de Wiel wrote:<br>
> <br>
> So far, the geo file looks great.<br>
> However, I want a mesh that is really fine around the chamber, and<br>
> that gradually becomes coarser toward the edge of the cylinder. <br>
> <br>
> I have of course read <br>
> <a href="http://gmsh.info/doc/texinfo/gmsh.html#Specifying-mesh-element-sizes" rel="noreferrer" target="_blank">http://gmsh.info/doc/texinfo/gmsh.html#Specifying-mesh-element-sizes</a><br>
> prior to using this mailing list, which resulted in failed attempts<br>
> such as:<br>
> <br>
> Characteristic Length {Volume{2};} = 500;<br>
> Characteristic Length {Volume{1};} = 50;<br>
> <br>
> How should I go about this?<br>
<br>
Read further an use Distance + Threshold fields.<br>
<br>
--<br>
jeremy theler<br>
<a href="http://www.seamplex.com" rel="noreferrer" target="_blank">www.seamplex.com</a><br>
<br>
<br>
_______________________________________________<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>
</blockquote></div>