[overture] Re: userDefinedDeformingBody

  • From: Yongsheng Lian <yongshenglian@xxxxxxxxx>
  • To: "Kyle K. Chand" <chand1@xxxxxxxx>
  • Date: Mon, 9 Feb 2009 09:30:20 -0500

Hi Kyle,

  Thanks for the message. Actually that is what I thought when I
changed the DeformingBodyMotion.C (I don't have
userDefinedDeformingSurface.C in the directory).  Because it did not
work, I went back to Overture.v22/primier and work on the example
deform.C.

  Without changing others, I replaced the start curve with the
following commands. Basically x0 is a ellipse and x1 is a bioconcave.
I also generate grid based on the bioconcave curve to replace the
iceCircle.hdf.  Well, I have a strange picture like the one in the
attachment.

 const int n0=100;
  realArray x0(n0,2), x1(n0,2), x2(n0,2);

  real rad=.5, theta;
  real pi=4.0*atan(1.0);
  real c0=0.207, c1=2.003, c2=-1.123, D=1.0;


  // x0: points on a arc
  for (int i=0; i<=n0; i++)
  {
   real omega=i*2.0*pi/n0+pi*0.5;
   x0(i,0)=2.0*sin(omega);
   x0(i,1)=-cos(omega);
   x1(i,0)=1.5*D*sin(omega);
   x1(i,1)=-1.0*D*cos(omega)*(c0+c1*sin(omega)*sin(omega)+c2*pow(sin(omega),4));
  }



  I checked the initial grid from Overture (attached), it is ok.  The
difference between the tutorial (iceCircle) and mine is that in the
tutorial, the ice is made of two curves while my biconcave is one
curve.


  Any suggestions are welcome.

Thanks,
 Yongsheng








On Fri, Feb 6, 2009 at 2:25 PM, Kyle K. Chand <chand1@xxxxxxxx> wrote:
> Hi Yongsheng,
>
> Look in the files
> cg/common/moving/src/DeformingBodyMotion.C
> cg/common/moving/src/userDefinedDeformingSurface.C
>
> You basically need to fill in (replace) a function that deforms
> the surface and regenerates the grid at each timestep.  See
> the function userDefinedDeformingSurface for example.
>
> You can also use the userDefinedMotion if you know how
> to blend two volume grids (i.e. you don't need to call the hyperbolic
> grid generator).  In that case you can look in userDefinedMotion.C .
>
> It is best to post these questions to the mailing list because
> there may be people out there who can answer the questions
> faster or might find the answers useful.
>
> Regards,
> Kyle
>
> On Thursday 05 February 2009 11:04, you wrote:
>> Hi Kyle,
>>
>>   Do you know how the userDefinedDeformingBody option works?
>>
>>   I guess the user should define two different grids. Then the solver
>> will gradually transform one geometry to another based on a defined
>> function.  I try to change a biconcave shape to a circle but cannot
>> make it  even after I set the velocity to zero.
>>
>> Yongsheng
>>
>
> --
> Kyle K. Chand
> mailto:chand1@xxxxxxxx
> phoneto:  (925)  422 7740
>

Other related posts: