📄 mainshuktest.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->setBorder(-8.0,8.0, -2.5,0.05);
base->addBox(wzRegion(2), -8.0,8.0, -3.0,-0.1);
cogenRefine ref = new CogenRefine(base->generator());
ref->refinementGlobal(0.81,0.21,1.0);
ref->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->refinementNearPoint(0.21,0.1,0, 1.0,0.4,0, 0.6,0.0,0);
ref->refinementNearPoint(0.21,0.11,0, 0.6,0.1,0, -3.2,-0.1,0);
ref->refinementNearPoint(0.11,0.11,0, 0.8,0.1,0, 0.3,-0.1,0);
ref->refinementNearPoint(0.41,0.05,0, 8.0,0.05,0, 0.0,-0.1,0);
ref->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& shuk1 = *new wzComplexShukowski;
shuk1.setShiftPoints(+0.0,-0.2,+0.0,0.6);
shuk1.setLambda(1.0);
wzComplexShukowski& shuk2 = *new wzComplexShukowski(&shuk1);
shuk2.setShiftPoints(-3.2,0.0,-3.2,0.5);
wzComplexShukowski& shuk3 = *new wzComplexShukowski(&shuk2);
shuk3.setShiftPoints(1.2,0.0,1.2,0.6);
cogenChart chart = new CogenChart(ref->generator(),&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->addBox(wzRegion(6),-8.2,8.2,-4.0,2.0);
wzIndex i1 = ortho->addBox(wzRegion(1),-8.0,8.0);
ortho->setFaceOfBox(wzFace(2),i1);
ortho->addBox(wzRegion(2),-8.0,8.0,-3.0,-1.0);
ortho->addPlaneY(0.04);
cogenRefine oref = new CogenRefine(ortho->generator());
oref->refinementGlobal(0.81,0.41,1.0);
oref->refinementNearPoint(0.05,1.0,0, 0.05,10.0,0, -8.0,0.0,0);
oref->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->add(chart->generator());
gen->add(oref->generator());
wzgrid grid = (*gen)();
grid->write("ibg.sg");
}
</PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -