next up previous
Next: Balloon program examples Up: User specified runtime routines Previous: Active elements

Sources and sinks of fluid

To specify sources and sinks of fluid within the domain for a given simulation, it is necessary to indicate their existence in the IBIS program by including the command source -n number (see the IBIS programming guide). The user is also required to specify the dynamic properites of the sources and sinks in a FORTRAN subroutine called getsrc. Default programs (with no sources or sinks) are provided in the IBIS software.

The template for getsrc has the following form.

c
c--------------------------------------------------------------
c
      subroutine getsrc (xsourc,ysourc,src,ntsrc)
c
c  user routine that specifies the sources
c
      include 'parm.inc'
      include 'domain.inc'
c
c  global variables
c
      integer ntsrc
      double precision xsourc(nsrc),ysourc(nsrc),src(nsrc)
c
c  *** ALL VARIABLES MUST BE DECLARED ***
c
      ntsrc = 0
c
      return
      end

The data for getsrc is provided in the common blocks and as passed arguments. The two common blocks parm.inc and domain.inc are discussed in the preceeding section on active entities. Please refer to that section for information regarding their structure and contents. The structure of the common blocks should not be changed by users and parm.inc must not be modified.

The data passed into getsrc via the call statement defines the number of sources, their locations and their strength. The data definitions are;

      xsourc     <- $x$ coordinate of the sources/sinks
      ysourc     <- $y$ coordinate of the sources/sinks
      src        <- the strength of the source
      ntsrc      <- the number of sources and sinks

The data xsourc, ysourc and src are arrays of double precision floating point numbers. The index of the numbers is used to determine the locations and sources, so that (xsourc(j), ysourc(j)) is the location of the source src(j). The number ntsrc is an integer and must be less than or equal to the number of sources that were specified in the IBIS source file. The points (xsourc(j), ysourc(j)) must all be within the domain declared in the IBIS source file. The integer nsrc is a parameter that is greater than or equal to the maximum number of sources/sinks. It must not be modified.

The sources and sinks are must not change the volume of the fluid. Thus, the sum of the strengths of the sources and sinks must equal zero because the fluid is incompressible. If they do not sum to zero at any time step IBIS will terminate.


next up previous
Next: Balloon program examples Up: User specified runtime routines Previous: Active elements
David Eyre
6/19/1998