diff --git a/src/forces.f90 b/src/forces.f90 index ce60d6702aa59c4fff917ef1e35e5bf7ef8cfa18..036d9154bb0d08bdf076a866e41d98c4484c9442 100644 --- a/src/forces.f90 +++ b/src/forces.f90 @@ -999,13 +999,13 @@ contains tp2 = sum(tpresy(:))/dt tp3 = sum(tpresz(:))/dt - mom1 = sum(tunstx(:) + tconvx(:) + tconvx2(:)) - mom2 = sum(tunsty(:) + tconvy(:) + tconvy2(:)) - mom3 = sum(tunstz(:) + tconvz(:) + tconvz2(:)) + mom1 = sum(tunstx(:) + tconvx(:) + (-2.0*tconv2_sign+1.0)*tconvx2(:)) !if tconv2sign == 1.0, multiply by -1 + mom2 = sum(tunsty(:) + tconvy(:) + (-2.0*tconv2_sign+1.0)*tconvy2(:)) + mom3 = sum(tunstz(:) + tconvz(:) + (-2.0*tconv2_sign+1.0)*tconvz2(:)) - dra1 = 2.0*(sum(tdiffx) + sum(tdiffx2) + tp1 - mom1) - dra2 = 2.0*(sum(tdiffy) + sum(tdiffy2) + tp2 - mom2) - dra3 = 2.0*(sum(tdiffz) + sum(tdiffz2) + tp3 - mom3) + dra1 = (sum(tdiffx) + sum(tdiffx2) + tp1 - mom1) + dra2 = (sum(tdiffy) + sum(tdiffy2) + tp2 - mom2) + dra3 = (sum(tdiffz) + sum(tdiffz2) + tp3 - mom3) do k=1,zsize(3) diff --git a/src/module_param.f90 b/src/module_param.f90 index 0125b3b969871047f44a2440148ce9e77a635ecd..9d16bbe878ea1fbff3cb582848cf6a5e16aa7016 100644 --- a/src/module_param.f90 +++ b/src/module_param.f90 @@ -620,7 +620,7 @@ module ibm_param real(mytype) :: cex,cey,cez,shx,shy,shz,oriw,orii,orij,orik,lvx,lvy,lvz,avx,avy,avz,ra,ubcx,ubcy,ubcz,rads,rho_s,ellip_m,c_air,cvl_scalar,grav_y,grav_x,grav_z real(mytype) :: position(3),orientation(4),linearVelocity(3),angularVelocity(4),linearAcceleration(3),linearForce(3),torque(3),shape(3),inertia(3,3) real(mytype) :: position_1(3),linearVelocity_1(3),orientation_1(4),angularVelocity_1(4) - real(mytype) :: chord,thickness,omega + real(mytype) :: chord,thickness,omega, tconv2_sign integer :: inana ! Analytical BC as Input integer :: imove, nozdrift, force_csv, bodies_fixed, cube_flag end module ibm_param diff --git a/src/parameters.f90 b/src/parameters.f90 index a1d480057212a67d366e781b43f4c38642ed96f5..2e50404ee4ad5cf9a369459c825ed5b1f9dd9cd0 100644 --- a/src/parameters.f90 +++ b/src/parameters.f90 @@ -62,7 +62,7 @@ subroutine parameter(input_i3d) NAMELIST /Tripping/ itrip,A_tr,xs_tr_tbl,ys_tr_tbl,ts_tr_tbl,x0_tr_tbl NAMELIST /ibmstuff/ cex,cey,cez,shx,shy,shz,oriw,orii,orij,orik,lvx,lvy,lvz,avx,avy,avz,ra, & nobjmax,nraf,nvol,iforces, cvl_scalar, npif, izap, ianal, imove, thickness, chord, omega , & - ubcx,ubcy,ubcz,rads,rho_s, c_air, grav_x,grav_y,grav_z, nozdrift, force_csv, bodies_fixed, cube_flag + ubcx,ubcy,ubcz,rads,rho_s, c_air, grav_x,grav_y,grav_z, nozdrift, force_csv, bodies_fixed, cube_flag, tconv2_sign NAMELIST /ForceCVs/ xld, xrd, yld, yud, zld, zrd NAMELIST /LMN/ dens1, dens2, prandtl, ilmn_bound, ivarcoeff, ilmn_solve_temp, & massfrac, mol_weight, imultispecies, primary_species, &