Commit 51bfc5a6 authored by tilman.metz's avatar tilman.metz

fixed copy and paste bug in 2nd Order free surface

parent 275248a8
......@@ -48,24 +48,18 @@ float *** psi_vxx, float *** psi_vzz ){
switch (FDORDER){
case 2 :
//dh24x=DX*24.0;
b1=9.0/8.0; b2=-1.0/24.0; /* Taylor coefficients */
if(FDCOEFF==2){b1=1.1382; b2=-0.046414;} /* Holberg coefficients E=0.1 %*/
for (k=1;k<=NZ;k++){
for (i=1;i<=NX;i++){
/*Mirroring the components of the stress tensor to make
a stress free surface (method of imaging, Levander, 1988)*/
syy[j][i][k]=ryy[j][i][k]=0.0;
syy[j][i][k]=0.0;
ryy[j][i][k]=0.0;
syy[j-1][i][k]=-syy[j+1][i][k];
sxy[j-1][i][k]=-sxy[j][i][k];
sxy[j-2][i][k]=-sxy[j+1][i][k];
syz[j-1][i][k]=-syz[j][i][k];
syz[j-2][i][k]=-syz[j+1][i][k];
/* in the case of using several relaxation mechanisms all
......@@ -77,14 +71,10 @@ float *** psi_vxx, float *** psi_vzz ){
variables rxx,rzz at the free surface */
/* first calculate spatial derivatives of components of particle velocities */
vxx = (b1*(vx[j][i][k]-vx[j][i-1][k])+b2*(vx[j][i+1][k]-vx[j][i-2][k]))/DX;
vyy = (b1*(vy[j][i][k]-vy[j-1][i][k])+b2*(vy[j+1][i][k]-vy[j-2][i][k]))/DY;
vzz = (b1*(vz[j][i][k]-vz[j][i][k-1])+b2*(vz[j][i][k+1]-vz[j][i][k-2]))/DZ;
/*vxx=(-vx[j][i+1][k]+27.0*(vx[j][i][k]-vx[j][i-1][k])+vx[j][i-2][k])/(dh24x);
vyy=(-vy[j+1][i][k]+27.0*(vy[j][i][k]-vy[j-1][i][k])+vy[j-2][i][k])/(dh24x);
vzz=(-vz[j][i][k+1]+27.0*(vz[j][i][k]-vz[j][i][k-1])+vz[j][i][k-2])/(dh24x);*/
vxx = (vx[j][i][k]-vx[j][i-1][k])/DX;
vyy = (vy[j][i][k]-vy[j-1][i][k])/DY;
vzz = (vz[j][i][k]-vz[j][i][k-1])/DZ;
if (ABS_TYPE==1){
if((POS[1]==0) && (i<=FW)){
psi_vxx[j][i][k] = b_x[i] * psi_vxx[j][i][k] + a_x[i] * vxx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment