anuga.Inlet_operator

class anuga.Inlet_operator(domain, region, Q=0.0, velocity=None, zero_velocity=False, default=0.0, description=None, label=None, logging=False, verbose=False)[source]

Inlet Operator - add water to an inlet. Sets up the geometry of problem

Inherit from this class (and overwrite discharge_routine method for specific subclasses)

Input: domain, Two points

__init__(domain, region, Q=0.0, velocity=None, zero_velocity=False, default=0.0, description=None, label=None, logging=False, verbose=False)[source]

Inlet Operator - add water to a domain via an inlet.

Parameters:
  • domain – Specify domain

  • region – Apply Inlet flow over a region (which can be a Region, Polygon or line)

  • Q – function(t) or scalar discharge (m^3/s)

  • velocity – Optional [u,v] to set velocity of applied discharge

  • zero_velocity – If set to True, velocity of inlet region set to 0

  • default – If outside time domain of the Q function, use this default discharge

  • description – Describe the Inlet_operator

  • label – Give Inlet_operator a label (name)

  • verbose – Provide verbose output

Example:

>>> inflow_region  = anuga.Region(domain, center=[0.0,0.0], radius=1.0)
>>> inflow = anuga.Inlet_operator(domain, inflow_region, Q = lambda t : 1 + 0.5*math.sin(t/60))

Methods

__init__(domain, region[, Q, velocity, ...])

Inlet Operator - add water to a domain via an inlet.

activate_logging()

get_Q()

get_applied_Q()

get_default(t[, err_msg])

Call get_default only if exception Modeltime_too_late(msg) has been raised

get_inlet()

get_time()

get_timestep()

get_total_applied_volume()

log_timestepping_statistics()

parallel_safe()

By default an operator is not parallel safe

print_statistics()

print_timestepping_statisitics()

print_timestepping_statistics()

set_Q(Q)

set_default([default])

Either leave default as None or change it into a function

set_label([label])

set_logging([flag])

statistics()

timestepping_statistics()

update_Q(t)

Allowing local modifications of Q

Attributes

counter