Skip to content

Commit

Permalink
lagrangian 3d
Browse files Browse the repository at this point in the history
  • Loading branch information
georgu committed Apr 23, 2015
1 parent b198e3d commit 7cc9efb
Show file tree
Hide file tree
Showing 26 changed files with 1,483 additions and 163 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ fembin/extDiff
fembin/extMerge
femplot/line_nodes
femplot/plotsim
femplot/lagxitest
femspline/gridr
grid/grid
mesh/exgrd
Expand Down
32 changes: 32 additions & 0 deletions COMMIT
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
============================================================

Thu Apr 23 15:43:09 CEST 2015

lagrangian 3d

.gitignore | 1 +
LOG | 24 ++
RELEASE_NOTES | 8 +
fem3d/Makefile | 10 +-
fem3d/lagrange.h | 87 ++++---
fem3d/lagrange_cont.f | 4 +-
fem3d/lagrange_flux.f | 1 +
fem3d/lagrange_init.f | 10 +-
fem3d/lagrange_inout.f | 185 +++++++++++++-
fem3d/lagrange_main.f | 129 +++++++---
fem3d/lagrange_track.f | 12 +-
fem3d/lagrange_vertical.f | 618 ++++++++++++++++++++++++++++++++++++++++++++-
fem3d/lgrinf.f | 19 ++-
fem3d/param.h | 6 +-
fem3d/subnev.f | 128 +++++++++-
fem3d/subxi.f | 46 +++-
femadj/param.h | 6 +-
femdoc/final/shyfem.pdf | Bin 293718 -> 293716 bytes
femdoc/final/shyfem.ps | 30 +-
femplot/Makefile | 1 +
femplot/lagxitest.f | 253 +++++++++++++++++--
femplot/param.h | 6 +-
femplot/suplag.f | 52 +++-
param.h | 6 +-
24 files changed, 1464 insertions(+), 178 deletions(-)

============================================================

Wed Apr 1 19:00:17 CEST 2015

New version 7_1_7
Expand Down
24 changes: 24 additions & 0 deletions LOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@

23.04.2015

lagrangian 3d

c ./femplot/suplag.f:
c 23.04.2015 ggu plotting for 3d particles
c
c ./fem3d/lgrinf.f:
c 23.04.2015 ggu for new version 5
c
c ./fem3d/lagrange_main.f:
c 23.04.2015 ggu internal coordinates implemented (blgrxi)
c
c ./fem3d/subnev.f:
c 19.04.2015 ggu new routines for internal coordinates (distance)
c 22.04.2015 ggu bug fix in xi2xy - x/y were exchanged
c
c ./fem3d/subxi.f:
c 23.04.2015 ggu compute s value for particle path
c
c ./fem3d/lagrange_vertical.f:
c 23.04.2015 ggu internal coodinates finished


01.04.2015

intermediate version
Expand Down
8 changes: 8 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@

23.04.2015 VERS_7_1_8

lagrangian 3d finished !!!!
internal coordinates introduced
should work also for geographical coordinates
works also for zeta (still to be checked)
no diffusion yet

01.04.2015 VERS_7_1_7

intermediate version (3D lagrangian not finished)
Expand Down
2 changes: 2 additions & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version 7_1_7 01-04-2015 VERS_7_1_7 commit_2015-04-23

version 7_1_7 01-04-2015 VERS_7_1_7

========================================================== 01-04-2015 - 7_1_7
Expand Down
10 changes: 6 additions & 4 deletions fem3d/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ HTOBJS = \
subets.o subetsa.o \
$(IFF_FILES) \
$(ECOLOGICAL_OBJ) \
$(NETCDF_OBJ) $(PARALLEL_OBJ)
$(NETCDF_OBJ) $(PARALLEL_OBJ) \
subxi.o

# objects for pre-processor vp

Expand Down Expand Up @@ -846,7 +847,8 @@ lagrange_dif.o: param.h femtime.h lagrange.h
lagrange_flux.o: depth.h hydro.h param.h nlevel.h ev.h femtime.h \
lagrange.h nbasin.h levels.h basin.h links.h
lagrange_init.o: nbasin.h param.h basin.h aux_array.h
lagrange_inout.o: param.h basin.h ev.h femtime.h lagrange.h
lagrange_inout.o: param.h basin.h ev.h nlevel.h femtime.h \
lagrange.h
lagrange_larve.o: param.h lagrange.h
lagrange_main.o: nbasin.h param.h basin.h femtime.h lagrange.h
lagrange_oil.o: nbasin.h param.h femtime.h ev.h lagrange.h \
Expand All @@ -855,8 +857,8 @@ lagrange_track.o: hydro_vel.h param.h levels.h basin.h nlevel.h \
lagrange.h geom.h
lagrange_util.o: nbasin.h param_dummy.h ev.h basin.h
lagrange_util_tr.o: param_dummy.h basin.h
lagrange_vertical.o: depth.h hydro_vel.h hydro.h param.h levels.h \
basin.h
lagrange_vertical.o: depth.h hydro_vel.h hydro.h param.h ev.h \
nlevel.h lagrange.h levels.h basin.h geom.h
lgrelab.o: nbasin.h depth.h param.h basin.h
lgrinf.o: param.h
loading.o: nbasin.h param.h levels.h
Expand Down
87 changes: 55 additions & 32 deletions fem3d/lagrange.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,56 @@ c 15.02.2009 ggu cleaned version
c 20.10.2011 ggu fx renamed to flux2d, new flux3d and vel3d_ie
c 16.12.2011 ggu new array id_body, new vars idbdy, lunit
c
c******************************************************************
c*****************************************************************

c-------------------------------------------------- main variables
c--------------------------------------------------
c main parameters
c--------------------------------------------------

logical bsurf !particle only in surface layer
parameter ( bsurf = .true. )
logical blgrxi !new version with xi coords
parameter (blgrxi=.true.)

logical blgrdebug,blgrsurf
common /lagr_b/blgrdebug,blgrsurf
save /lagr_b/

integer ilagr !type of lagrangian simulation
integer nbdy !total number of particles
integer idbdy !max id used
integer lunit !unit for messages
common /lagr_i/nbdy,idbdy,lunit
integer ipvert !vertical release
common /lagr_i/ilagr,nbdy,idbdy,lunit,ipvert
save /lagr_i/

c--------------------------------------------------
c special variables
c--------------------------------------------------

real azlgr !az parameter
common /azlgr/azlgr

real tdecay !decay time - do not use
common /tdecay/tdecay

real fall !vertical sinking velocity
common /fall/fall

integer artype !special element type
common /artype/artype

c--------------------------------------------------
c horizontal diffusion
c--------------------------------------------------

real rwhpar !horizontal diffusivity
common /rwhpar/rwhpar

real rwhvar(neldim) !horizontal diffusivity (vary)
common /rwhvar/rwhvar

c--------------------------------------------------
c arrays
c--------------------------------------------------

integer est(nbdydim) !initial element number
common /est/est
Expand Down Expand Up @@ -65,23 +104,14 @@ c-------------------------------------------------- main variables
integer id_body(nbdydim) !id of particle
common /id_body/id_body

c-------------------------------------------------- random walk

real rwhpar !horizontal diffusivity
common /rwhpar/rwhpar

real rwhvar(neldim) !horizontal diffusivity (vary)
common /rwhvar/rwhvar

c-------------------------------------------------- backtracking
c--------------------------------------------------
c backtracking
c--------------------------------------------------

integer nback
logical bback
common /backtrack/ nback, bback

logical bsurface !keep particles on surface
parameter (bsurface=.true.)

real v_lag(neldim), u_lag(neldim) !backtracking velocity
common /v_lag/v_lag, /u_lag/u_lag

Expand All @@ -97,7 +127,9 @@ c-------------------------------------------------- backtracking
real z_back(neldim) !backtracking z-coordinate
common /z_back/z_back

c-------------------------------------------------- fluxes and velocities
c--------------------------------------------------
c fluxes and velocities
c--------------------------------------------------

real flux2d(3,neldim) !fluxes of sides
common /flux2d/flux2d
Expand All @@ -114,18 +146,9 @@ c-------------------------------------------------- fluxes and velocities
real dvert(3,neldim)
common /dvert/dvert

c-------------------------------------------------- special variables

real tdecay !decay time - do not use
common /tdecay/tdecay

real fall !vertical sinking velocity
common /fall/fall

integer artype !special element type
common /artype/artype

c------------------------------------------------------------
c--------------------------------------------------
c conncectivity
c--------------------------------------------------

integer i_count(neldim)
double precision t_count(neldim)
Expand All @@ -134,11 +157,11 @@ c------------------------------------------------------------
common /t_count/t_count
save /i_count/,/t_count/

c------------------------------------------------------------
c--------------------------------------------------

integer*8 lgr_bitmap_in(nbdydim) !bitmap for entry
integer*8 lgr_bitmap_out(nbdydim) !bitmap for leave
common /lgr_bitmap/lgr_bitmap_in,lgr_bitmap_out

c------------------------------------------------------------
c--------------------------------------------------

4 changes: 2 additions & 2 deletions fem3d/lagrange_cont.f
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ subroutine create_parts(np,k1,k2)
rt = ggrand(77)
x = x1 + rl*dx
y = y1 + rl*dy
call insert_particle(ie1,rt,x,y)
call insert_particle_3d(ie1,rt,x,y)
!write(6,*) i,rl,x,y,ie1
end do

Expand Down Expand Up @@ -371,7 +371,7 @@ subroutine release_on_point(ppts,ie,x,y,n)

do i=1,n
rt = ggrand(77) !vary time
call insert_particle(ie,rt,x,y)
call insert_particle_3d(ie,rt,x,y)
!write(55,*) 'gguuyy particle: ',ie,rt,x,y
end do

Expand Down
1 change: 1 addition & 0 deletions fem3d/lagrange_flux.f
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ subroutine setup_fluxes_3d

call getaz(azpar)
az = azpar
azlgr = az !store in include file

do ie=1,nel
lmax = ilhv(ie)
Expand Down
10 changes: 6 additions & 4 deletions fem3d/lagrange_init.f
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,13 @@ subroutine lagbound_seed_particles(dxy,n,x,y)

implicit none

include 'param.h'

real dxy
integer n
real x(1),y(1)

include 'param.h'
include 'nbasin.h'
!include 'lagrange.h'

integer iflag(neldim)

Expand Down Expand Up @@ -511,7 +511,7 @@ subroutine lagbound_seed_particles(dxy,n,x,y)
if( iin .ne. 0 ) then
if( ifl .eq. 1 .or. inpoly(n,x,y,xp,yp) ) then
np = np + 1
call insert_particle(ie,0.,xp,yp)
call insert_particle_3d(ie,0.,xp,yp)
end if
end if
end do
Expand All @@ -538,7 +538,9 @@ subroutine lgr_init_all(dxy)

real dxy

!include 'param.h'
include 'nbasin.h'
!include 'lagrange.h'

integer ie,i,j
integer nin,iin
Expand Down Expand Up @@ -575,7 +577,7 @@ subroutine lgr_init_all(dxy)

if( iin .ne. 0 ) then
nin = nin + 1
call insert_particle(ie,0.,xp,yp)
call insert_particle_3d(ie,0.,xp,yp)
end if
end do
end do
Expand Down
Loading

0 comments on commit 7cc9efb

Please sign in to comment.