 | Software Modeling of Liquids & Gases |  |
All models comprise features common to every single model (ship, jetty, chemical plant etc) discussed in Generic Issues and are described on this page.
In addition, ship models have to reflect the fact that ships are not fixed in space and that there are many types of equipment which, having been modeled once, can be reused in other models with little or no change. These aspects are identified in the Specific Issues section.
Generic issues
All models comprise features that are common throughout.
Each model operates by calculating mass and heat flows at a given time, from a known state at time t, and predicting a new state at time t + dt. If the time step dt is small enough, simple integration is possible. Real-time modeling requires that the period dt must be long enough to enable all the calculations to be carried out which, for a complex system like a tanker, are quite time-consuming. In practice not all aspects can be handled simply.
The central issues of all ship or plant models are the following:
Tank models
Fluid dynamics
Thermodynamics
Tank Models
As "tanks" are by definition large, these are in principle the easiest features to model. Inflows (heat and liquid/vapor mass) are added, outflows (heat and liquid/vapor mass) are subtracted, and a new state (composition, pressure, temperature) is calculated. This is simple only in the case of homogeneous liquid and
vapor phases with no mass exchange between liquid and gas phase (e.g. segregated ballast tanks).
More complex models deal with the following aspects:
Vapor/liquid exchange
In tanks containing liquefied gases, and also in tanks holding oil or other petroleum products containing low-molecular hydrocarbons, evaporation or condensation will take place. This is handled by a thermodynamics module (see below).
Stratification in liquid
Firstly, oil cargo tanks may at any time contain a mix of oil and water, in the form of an emulsion and/or "dry" oil and/or "clean" water. The dynamic
behavior of such mixes requires a separate model.
Secondly, liquefied gases may stratify (cold layer on top of warmer bulk liquid).
Consequently the models are set up to handle multi-components within the liquid phase allowing very detailed
behavior between each component to be simulated. Examples of the type of components considered in standard cargoes are:
Crude Oil: Oil layer, Water, Emulsion, Sludge
LNG: Methane, Ethane, Propane, CO2, Oxygen, Nitrogen
Stratification in gas phase
Firstly, Displacement Inerting/purging is a standard technique. The model must therefore be able to predict whether displacement or dilution will occur.
Secondly, if crude oil or another essentially non-volatile liquid contains a volatile component heavier than ethane, a gas-rich layer will form if the tank is not disturbed.
Consequently, the models incorporate two components within the gas phase such as inert gas and air, or light / heavy components.
Fluid dynamics
Two main aspects are considered namely 'flowsetters' and 'networks'.
Flowsetters
These are variable devices which control liquid or gas flow, for example valves, pumps and compressors. Their characteristics are simulated, including specific features such as pump cavitation and overspeed, or heating by adiabatic compression. The model establishes flow as a function of pressure differential, viscosity (itself a function of composition and temperature) and state of the flowsetter. Flow also carries composition and heat information and thus permits recalculation of compositions, quantities and temperatures throughout the system.
Networks
These are made up of nodes, a node being a contained space whose volume is not at least an order of magnitude greater than the flow per timestep dt, or which is (or may be) full of liquid (considered incompressible in the pressure ranges normally encountered). Integration is thus not possible for a node. Instead it is necessary to set up and solve a system of simultaneous equations which will ensure, essentially, that total inflow equals total outflow for each node over time. This system of equations yields a set of pressures and inflows/outflows for each node, which are again used to recalculate its contents (composition, temperature). Note that a node may contain mixed phases and that mixed-phase flow is thus possible. Except for special cases, liquid/vapor equilibrium is not normally considered within a node.
Thermodynamics
Two main areas have to be addressed:
Heat flow
This is generally simple to handle. The heat transported by mass flow is automatically accounted for. In addition, heat transfer across interfaces is a simple function of temperature difference and can generally be integrated directly.
Liquid/vapor mass exchange
This is more complex. Firstly, a system containing more than one
condensable component cannot be solved analytically even to establish the equilibrium state, iteration is required. Secondly, it is not normal to actually reach equilibrium with large tanks - something will intervene. The non-equilibrium aspect is
modeled by assuming uniform conditions for the bulk liquid and by special
modeling of the boundary layers (which mediate the heat and mass exchange).
|