⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainshuktest.html

📁 有限元学习研究用源代码(老外的),供科研人员参考
💻 HTML
字号:
<TITLE>COG 2.0: Shukowski coordinates</TITLE>

<H1>COG 2.0: Shukowski coordinates</H1>

 <P>A possibility to obtain spline-like conformal coordinates to model
non-trivial surfaces is the composition of Shukowski transformations.
A Shukowski transformation can be used to move a given point x0 to
another point x1, modifying the coordinates in the neighbourhood of
the point, but without a lot of change far away from the point. 

 <P>Here we see an example of a composition of three Shukowski
transformations to obtain a non-trivially curved surface. Near the
surface we want to have a very fine grid in orthogonal direction:

 <P><IMG SRC="shuktest.gif">

<PRE>
#include "<A HREF="coglib.hxx">cog/coglib.hxx</A>"
int main()
{
  cogenOctree base = new CogenOctree();
  base-&gt;setBorder(-8.0,8.0, -2.5,0.05);
  base-&gt;addBox(wzRegion(2), -8.0,8.0, -3.0,-0.1);
  cogenRefine ref = new CogenRefine(base-&gt;generator());
  ref-&gt;refinementGlobal(0.81,0.21,1.0);
  ref-&gt;faceRefinementGlobal(0.008,1.0);
</PRE>

 <P>The following refinement has been useful to solve the
 <A HREF="curvatureproblem.html">curvature problem</A> (step by step
- looking where a problem occurs, then introducing an additional
refinement near the problem):

<PRE>
  ref-&gt;refinementNearPoint(0.21,0.1,0,  1.0,0.4,0,  0.6,0.0,0);
  ref-&gt;refinementNearPoint(0.21,0.11,0,  0.6,0.1,0, -3.2,-0.1,0);
  ref-&gt;refinementNearPoint(0.11,0.11,0,  0.8,0.1,0,  0.3,-0.1,0);
  ref-&gt;refinementNearPoint(0.41,0.05,0,  8.0,0.05,0,  0.0,-0.1,0);
  ref-&gt;refinementNearPoint(0.81,0.4,0,  8.0,0.2,0,  0.0,-0.1,0);
</PRE>

 <P>Now the most interesting part - the definition and composition of
the Shukowski functions:

<PRE>
  wzComplexShukowski&amp; shuk1 = *new wzComplexShukowski;
  shuk1.setShiftPoints(+0.0,-0.2,+0.0,0.6);
  shuk1.setLambda(1.0);
  wzComplexShukowski&amp; shuk2 = *new wzComplexShukowski(&amp;shuk1);
  shuk2.setShiftPoints(-3.2,0.0,-3.2,0.5);
  wzComplexShukowski&amp; shuk3 = *new wzComplexShukowski(&amp;shuk2);
  shuk3.setShiftPoints(1.2,0.0,1.2,0.6);
  cogenChart chart = new CogenChart(ref-&gt;generator(),&amp;shuk3);
</PRE>

 <P>Outside the interesting region we define an orthogonal grid.  A
remarkable point is the definition of region 2, which is defined as
the union of two parts - one for each system of coordinates. 

 <P>Another point is that introducing a coarse grid plane at Y=0.04 we
have solved a <A HREF="matchproblem.html">match problem</A>.

<PRE>
  cogenOctree ortho = new CogenOctree;
  ortho-&gt;addBox(wzRegion(6),-8.2,8.2,-4.0,2.0);
  wzIndex i1 = ortho-&gt;addBox(wzRegion(1),-8.0,8.0);
  ortho-&gt;setFaceOfBox(wzFace(2),i1);
  ortho-&gt;addBox(wzRegion(2),-8.0,8.0,-3.0,-1.0);
  ortho-&gt;addPlaneY(0.04);
  cogenRefine oref = new CogenRefine(ortho-&gt;generator());
  oref-&gt;refinementGlobal(0.81,0.41,1.0);
  oref-&gt;refinementNearPoint(0.05,1.0,0,  0.05,10.0,0, -8.0,0.0,0);
  oref-&gt;refinementNearPoint(0.05,1.0,0,  0.05,10.0,0,  8.0,0.0,0);
</PRE>

 <P>What remains is standard.

<PRE>
  cogenComposite gen = new CogenUnion;
  gen-&gt;add(chart-&gt;generator());
  gen-&gt;add(oref-&gt;generator());
  wzgrid grid = (*gen)();
  grid->write("ibg.sg");
}
</PRE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -