Skip to content
Snippets Groups Projects
Commit 0417650c authored by Dave Whipp's avatar Dave Whipp
Browse files

Added user-supplied scaling factor for Kaus surface oscillation suppression algorithm

parent 53832256
No related branches found
No related tags found
No related merge requests found
...@@ -200,9 +200,9 @@ do ileaves=1,osolve%nleaves ...@@ -200,9 +200,9 @@ do ileaves=1,osolve%nleaves
iloc=ifind_loc_wsmp(i1loc,i1,ja,ia,n_iproc,nz_loc) iloc=ifind_loc_wsmp(i1loc,i1,ja,ia,n_iproc,nz_loc)
elem_dz=(osolve%z(osolve%icon(5,ileaves))-osolve%z(osolve%icon(1,ileaves)))*params%vex elem_dz=(osolve%z(osolve%icon(5,ileaves))-osolve%z(osolve%icon(1,ileaves)))*params%vex
if (k1 < 5) then if (k1 < 5) then
avals(iloc)=avals(iloc)-(params%dt*(-weightel(ileaves)))/(2.d0*elem_dz) avals(iloc)=avals(iloc)-params%damp_factor*(params%dt*(-weightel(ileaves)))/(2.d0*elem_dz)
else else
avals(iloc)=avals(iloc)+(params%dt*(-weightel(ileaves)))/(2.d0*elem_dz) avals(iloc)=avals(iloc)+params%damp_factor*(params%dt*(-weightel(ileaves)))/(2.d0*elem_dz)
endif endif
endif endif
endif endif
......
...@@ -274,6 +274,7 @@ module definitions ...@@ -274,6 +274,7 @@ module definitions
double precision e2d0 double precision e2d0
double precision minp double precision minp
double precision pressure0 double precision pressure0
double precision damp_factor
character*128 restartfile character*128 restartfile
character*40 infile character*40 infile
end type end type
......
...@@ -484,6 +484,10 @@ if (iproc==0) then ...@@ -484,6 +484,10 @@ if (iproc==0) then
end if end if
call mpi_bcast(params%damp_surface,1,mpi_logical,0,mpi_comm_world,ierr) call mpi_bcast(params%damp_surface,1,mpi_logical,0,mpi_comm_world,ierr)
params%damp_factor=1.0d0
if (iproc==0) call scanfile (params%infile,'damp_factor',params%damp_factor,ires)
call mpi_bcast(params%damp_factor,1,mpi_double_precision,0,mpi_comm_world,ierr)
params%remove_surf_pts=.false. params%remove_surf_pts=.false.
if (iproc==0) then if (iproc==0) then
call scanfile (params%infile,'remove_surf_pts',answer,ires) call scanfile (params%infile,'remove_surf_pts',answer,ires)
...@@ -1158,6 +1162,7 @@ if (params%debug.gt.0 .and. iproc.eq.0) then ...@@ -1158,6 +1162,7 @@ if (params%debug.gt.0 .and. iproc.eq.0) then
write(*,'(a,i4)') shift//'initial_refine_level ',params%initial_refine_level write(*,'(a,i4)') shift//'initial_refine_level ',params%initial_refine_level
write(*,'(a,e11.4)') shift//'dt ',params%dt write(*,'(a,e11.4)') shift//'dt ',params%dt
write(*,'(a,l1)') shift//'damp_surface ',params%damp_surface write(*,'(a,l1)') shift//'damp_surface ',params%damp_surface
write(*,'(a,e11.4)') shift//'damp_factor ',params%damp_factor
write(*,'(a,l1)') shift//'remove_surf_pts ',params%remove_surf_pts write(*,'(a,l1)') shift//'remove_surf_pts ',params%remove_surf_pts
write(*,'(a,e11.4)') shift//'penalty ',params%penalty write(*,'(a,e11.4)') shift//'penalty ',params%penalty
write(*,'(a,e11.4)') shift//'tempscale ',params%tempscale write(*,'(a,e11.4)') shift//'tempscale ',params%tempscale
...@@ -1381,6 +1386,7 @@ if (params%debug.gt.1) then ...@@ -1381,6 +1386,7 @@ if (params%debug.gt.1) then
write(threadinfo%Logunit,'(a32,i4)') 'initial_refine_level ',params%initial_refine_level write(threadinfo%Logunit,'(a32,i4)') 'initial_refine_level ',params%initial_refine_level
write(threadinfo%Logunit,'(a32,e11.4)') 'dt ',params%dt write(threadinfo%Logunit,'(a32,e11.4)') 'dt ',params%dt
write(threadinfo%Logunit,'(a32,l1)') 'damp_surface ',params%damp_surface write(threadinfo%Logunit,'(a32,l1)') 'damp_surface ',params%damp_surface
write(threadinfo%Logunit,'(a32,e11.4)') 'damp_factor ',params%damp_factor
write(threadinfo%Logunit,'(a32,l1)') 'remove_surf_pts ',params%remove_surf_pts write(threadinfo%Logunit,'(a32,l1)') 'remove_surf_pts ',params%remove_surf_pts
write(threadinfo%Logunit,'(a32,e11.4)') 'penalty ',params%penalty write(threadinfo%Logunit,'(a32,e11.4)') 'penalty ',params%penalty
write(threadinfo%Logunit,'(a32,e11.4)') 'tempscale ',params%tempscale write(threadinfo%Logunit,'(a32,e11.4)') 'tempscale ',params%tempscale
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment