How to implement the function of the sponge layer in Navier-Stokes Solver ?

350 views
Skip to first unread message

qunbi...@gmail.com

unread,
Apr 6, 2018, 7:39:20 AM4/6/18
to basilisk-fr
Hello everyone:
        
     
I used Navier-Stokes solver to generate a regular gravity waves (attached wave.c), it seems work well. However, I don't know how to avoid the reflection waves. Does anyone have experience or thoughts on this?

Any suggestion and help would be grateful.

Best regards,

Qunbin
wave.c

Antoon van Hooft

unread,
Apr 7, 2018, 12:58:58 AM4/7/18
to basilisk-fr
Hallo Qunbin,

You can nudge parts of the domain towards a prescribed solution. An example to damp velocity and
buoyancy fluctuations at the top boundary is presented here:
http://basilisk.fr/sandbox/Antoonvh/freeconv.c#buoyancy-acceleration-spongelayer-and-diffusion-of-t-field

Note that for the "T"-scalar damping, I shoud have weighted the damping term with "dt" for consistency.

Antoon



Stephane Popinet

unread,
Apr 7, 2018, 8:05:01 AM4/7/18
to basil...@googlegroups.com
One way of doing this is to use the "reduced gravity" approach and apply
standard outflow conditions (i.e. neumann for normal velocity and
dirichlet for pressure). See:

http://basilisk.fr/src/reduced.h

Stephane

qunbi...@gmail.com

unread,
Apr 7, 2018, 8:36:31 AM4/7/18
to basilisk-fr
Hello Antoon,

   Thank you very much for the prompt reply.
  
    The expression ((exp((y-3)/0.1)*(y>3)*(y<3))+(y>3))  (Here, L0 = 3) is always equal to zero, I was wondering if there is a mistake. (May be ((exp((y-3)/0.1)*(y>2)*(y<3))+(y>3))? )

  event acceleration (i++)
{   
  coord Del = { 0 , 1, 0}; 
  foreach_face()
    {
      av.x[] = Del.x* (((T[]+T[-1])/2)-(((u.x[]+u.x[-1])/2)*((exp((y-3)/0.1)*(y>3)*(y<3))+(y>3))));   
    }
  
  foreach()
    {
      T[]-=(T[]-y) * ((exp((y-3)/0.05)*(y>2)*(y<3))+(y>3));
  }
}
In fact, I have tried to add the following code as a sponge layer, however, it does't work (attached wave.png).
event spon (i++)
{

  foreach()
    {
      if (x > 4*7.71875)
       {
          u.x[] = u.x[]* pow(tanh(5*(L0 - x)/L1), 14);
          u.y[] = u.y[]* pow(tanh(5*(L0 - x)/L1), 14);
       }

      else
      {
       u.x[] = u.x[];
       u.y[] = u.y[];
      }
    }

}

  Finally, thank you for your valuable advise again.

Best regards,

Qunbin


在 2018年4月7日星期六 UTC+8下午12:58:58,Antoon van Hooft写道:
wave.png

qunbi...@gmail.com

unread,
Apr 7, 2018, 8:42:26 AM4/7/18
to basilisk-fr
Hello stephane,

  Thank you for your excellent suggestions, I'll try it.

Best regards,

Qunbin

在 2018年4月7日星期六 UTC+8下午8:05:01,Stephane Popinet写道:

Arne Bøckmann

unread,
Apr 11, 2018, 1:39:06 AM4/11/18
to basilisk-fr
Hi,
My usual method for avoiding reflections is to apply a ramped zone around all boundaries of the domain, where the CFD solution is gradually forced to the undisturbed wave.  This requires an accurate, known solution for the undisturbed wave field.
The forcing can be implemented by adding momentum and mass source terms proportional to the difference in velocity and volume fraction between the undisturbed solution and the CFD solution.  This will give you some free parameters (time and length scales) which can be set based on the length scale of the features stirring up the undisturbed solution; i.e., the wave length and celerity of the diffracted waves.  I usually apply this zone both at the wave inlet and wave exit.
More details here:
http://proceedings.asmedigitalcollection.asme.org/proceeding.aspx?articleid=1911554

A different, and more sophisticated approach is presented here:
http://www.math.rug.nl/~veldman/preprints/Luppes-Eccomas2010.pdf

BR, Arne

qunbi...@gmail.com

unread,
Apr 11, 2018, 3:36:07 AM4/11/18
to basilisk-fr
Dear Arne,

  Thank you for your valuable advice and your article. It's something like the method used in this paper


Best regards,

Qunbin

在 2018年4月11日星期三 UTC+8下午1:39:06,Arne Bøckmann写道:
Reply all
Reply to author
Forward
0 new messages