You are on page 1of 6

Application of Orbital Mechanics and Genetic

Algorithm in Civil Engineering


Debayan Bose

 then at Colorado State University, with the addition of Green


Abstract—Computational prediction of flow is a multi-step & Ampt infiltration, detention storage and diffusive-wave
procedure-mathematical modeling of the transport processes of a channel routing. The current research has been developed
flow into the set of governing equations with appropriate boundary keeping in mind all the above-stated theoretical perspective.
conditions, discretisation of the governing equations in space and Computational Fluid Dynamics (CFD) and water resource
time into a set of coupled quasi-linear algebraic equations and finally engineering are the two broad fields in civil engineering where
to solve these equations. The finite difference technique along with
the introduction of Orbital Mechanics successfully enhanced
the genetic algorithm gives rise to compute the hydrologic parameter
in water resource engineering. The Sediment Transport model
the research development.
originally began with a two-dimensional overland flow routing
algorithm and also it has been applied in the field of watershed II. DEVELOPMENT OF THE MODEL
management. An attempt has been made to present the basic To understand the method by which the hydrological model
algorithm that leads to the development of genetic algorithm. From conducts its calculations, it is important to conceptualize the
the solution of Kepler’s equation to the solution of Trajectory paths,
the orbital mechanics has successfully supported Newton’s Finite
two dimensional spatial nature and resolution of the given
Difference. Calculation of Orbital Element from State Vector has watershed data. The explicit numerical solution is achieved by
been applied to the watershed management in this paper to support its segmenting the entire catchment area into equal square
wide application in watershed algorithm. elements, which are then assigned parameters relating to soil
infiltration characteristics, roughness coefficients, and soil
Keywords—Kepler’s equation, Genetic Algorithm, Finite erosion parameters. As each parameter is defined, it is
Difference, Orbital Mechanics assumed to be uniform throughout the cell area with the actual
value assigned to a central nodal point Figure provides a
I. INTRODUCTION visual illustration of how the grid concept within the
Over the last three decades Finite Difference has rapidly Hydrologic model is defined for a small nine-cell section of a
evolved from an academic curiosity to an extremely powerful watershed (Julien and Saghafian 1991). As the model
practical tool for analysis curiosity to an extremely powerful progresses beyond the commencement of the rain event, the
practical tool for the analysis of complex flow field of method used to determine the infiltration depth for each time
engineering interest. The formulation of appropriate step is based upon the total current accumulated infiltration
mathematical models needs special considerations to account depth. The infiltration capacity is then compared to the
for the geometrical complexities like handling arbitrary shaped existing surface depth divided by the established time step
flow boundaries as well as the physical complexities like (representing the maximum possible rate at which surface
simulating the effects of fluid turbulence. The basic equations water can infiltrate the soil layer). Based upon this
to be solved are a set of non-linear, strongly coupled partial comparison, if the infiltration capacity is greater than the
differential equations representing the conservation of mass maximum infiltration rate, all of the surface water will be
and momentum components along the Cartesian directions. In transformed to a local infiltration depth. Conversely, if the
case of heat and mass transfer problems additional equations capacity is less than the maximum rate, then the value of
are required for conservation of energy or mass species as surface depth divided by the time step is reduced by the
well. In general coordinate system, several base vectors may capacity rate. This result is then multiplied by the time step to
be defined with reference to which other vectors and tensors convert it back to a depth value. The model determines the
could be resolved. The choice of these base vectors determines infiltration for each cell at the middle of the given time step.
how the divergence operators of the tensor equation are
expressed and consequently what governing partial differential
equations result. The water budget equation which is one of
the most important equations of hydrological model is o based
on Finite Difference technique. The overland flow routing
module was converted from APL to FORTRAN by Saghafian, where:
t = present time; Δt = time step; F = accumulated infiltration
Debayan Bose was with Jadavpur University, Kolkata,India. He is now
depth; Md = moisture deficit; Hf = water pressure head. Since
with the Department of Statistical Quality Control,Indian Statistical Institute, the Green-Ampt equation is implicit with respect to time, a
Kolkata, India, (e-mail:mtq0902@isical.ac.in)..
time-explicit solution was proposed by Li et al. (1976) as
follows:
( ) ( ) (
( ) ( ) ( ) ( )
) ( )
simplifying this equation, and solving for ft+Δt results in the
following expression where the superscripts specify the time: Similarly, the discharge, ( ) (
( ) ) ( ) are calculated based on the sign of
The fundamental basis for overland flow routing within 2D ( ), ( ) and ( )
hydrologic model is derived from the conservation of mass The initial condition for surface depth is assumed to be zero
principle. For a fluid, this principle can be applied as the and the boundary condition is accounted for by having no
continuity relationship as long as the assumption of inflow coming from outside of the basin's boundaries.
incompressibility is valid. These principles maintain that as
fluid enters a given control volume over a finite period of
time, the change in mass of that volume is proportional to the III. SOLUTIONS FOR CHANNEL FLOW
mass entering that volume. When applied to the model, the The process by which hydrologic transports runoff through a
application of this principle depicts the flow of runoff from defined channel network is based on a one-dimensional,
one grid cell to another. In this respect, water can be routed diffusive wave approximation scheme. This scheme is
throughout the system until equilibrium is achieved. As shown mathematically similar to that used for overland flow
by Saghafian (1992), the application of the first order computations. As the modeled rainfall event progresses,
approximation to the continuity equation for element (j,k) can overland flow are routed through the overland planes until the
be described by the following equation. flow reaches a channel location. This flow is then transformed
( ) ( ) into a channel flow component and routed through the channel
( ) ( ) network to the defined outlet location. During the flow routing
process, channel losses or gains are neglected. The channel
( ) ( ) network defined in any project is made up of links, numbered
according to the computational order. A channel link is made
Where ht+Δt(j,k) = flow depth at element (j,k) at time t+Δt up of connected grid cells, called the nodes of that particular
ht(j,k) = flow depth at element (j,k) at time t; Δt = time step link. Each node describes the channel reach represented by
duration; re = average excess rainfall rate over one time step that node with geometric and hydraulic characteristics. The
beginning at time t; (k→k+1) = unit flow rates in the x- channel cross section is assumed to be rectangular. The flow
direction at time t, from (j,k) to (j, k+1); q tx (k-1→k) = unit occurs from one cell center to the neighboring cell center in
flow rates in the x-direction at time t, from (j, k-1) to (j,k); any of the eight flow directions. The channel is assumed to be
qyt(j→j+1) = unit flow rates in the y-direction at time t, from located in the middle of the grid cell.
(j,k) to (j+1, k); q yt(j-1→j) = unit flow rates in the y-direction
at time t, from (j-1, k) to (j,k); W = grid size
The unit flow rate terms used in the above equation are
determined in the model by a discretized form of Manning’s Flood Plain Flood Plain

roughness equation, which presumes all flow is within the


turbulent regime. The direction of the unit flow rate for any
Depth
given time and location is strictly dependent on its relation to
the friction slope, Sf, shown in the following equations for the
x- and y-direction (Saghafian 1992):
( ) ( ) Width
( ) ( )

( ) ( ) Cell- Width
( ) ( )
And the bed slope is expressed as: Hydrologic simulations involving channel flow is able depict
time varying backwater effects for simulated runoff flows.
( ) ( ) These backwater effects are continuous as they are carried
( )
through all associated channel junctions within the defined
The unit flow rate is approximated within the model for flow stream network (Saghafian 1992). The computational time
between two elements oriented in the x-direction, (j,k-1) and step in channels is first equal to the simulation time step. In
(j,k) as: the case in which the channel routing becomes unstable at a
given time step, this time step is cut in half and the flow is
( ) ( ) routed in the channel network in two smaller steps. If the the
(
( ) channel depth still becomes negative, the time step is divided
) ( ) again by two. This process is repeated until the water can be
routed in the channels without being unstable or until the time programming is a domain-independent method that genetically
step becomes unreasonably small (<0.0001). breeds a population of computer programs to solve a problem.
Specifically, genetic programming iteratively transforms a
IV. EXPLICIT SOLUTION FOR CHANNEL TRANSPORT population of computer programs into a new generation of
Most existing models are based upon the same fundamental programs by applying analogs of naturally occurring genetic
physical principles of conservation of mass and momentum operations. This process is illustrated in the following figure:
(Bennett 1974). In a physical model, the erosion components Genetic Population of Run Programs and
are normally subsidiary to a hydrologic model. Random Programs Evaluate their Quality
In the overland cells, the flow, q, is computed at each cell (j,k)
in two orthogonal directions to the neighboring cell (jj,kk) – to
the right of the cell and to the down side of the cell. In any of
those directions, the flux can be: Breed Fitter Programs
1. Positive: this is an inflow (q < 0) to that cell and Sf < 0. In
this case, the sediment is transported into the current
computational cell (j to = j , k to = k) from the source cell The basic tree like structure is given below:
(jfrom = jj, k from = kk).
2. Negative: this is an outflow (q > 0) from that cell and Sf ≥ Max
0. In this case, the sediment is transported out of the current
computational cell (j from = j , k from = k) and into the sink
cell (j to = jj , k to = kk).
Once the source or outgoing cell (j from, k from) and the sink
or receiving cell (j to, k to) has been determined, the transport
capacity is calculated using the Kilinc and Richardson
equation.

( )
| | | | ( )
( )
This volume of sediment is transported by size fraction from Genetic programming starts from a high-level statement of the
the suspended, deposited or parent material portion in the requirements of a problem and attempts to produce a computer
source cell (j from, k from) to the suspended portion of the program that solves the problem. The human user
sink cell ( j to, k to). In the channels, the total flow q is communicates the high-level statement of the problem to the
computed at each cell (j,k) between that cell and the genetic programming algorithm by performing certain well-
downstream cell (jj,kk). In case of a positive flow (inflow), the defined preparatory steps. The five major preparatory steps for
sediment is transported into the current computational cell (j to the basic version of genetic programming require the human
= j , k to = k) from the downstream cell (j from = jj, k from = user to specify
kk). In case of a negative flow (outflow), the sediment is 1. The set of terminals (e.g., the independent variables of the
transported out of the current computational cell (j from = j , k problem, zero argument functions, and random constants) for
from = k) and into the sink or downstream cell (j to = jj , k to each branch of the to-be evolved program,
= kk). Once the source or outgoing cell (j from, k from) and 2. The set of primitive functions for each branch of the to-be-
the sink or receiving cell (j to, k to) have been determined, the evolved program,
transport capacity is calculated using the Engelund and 3. The fitness measure (for explicitly or implicitly measuring
Hansen equation. This volume of sediment is transported by the fitness of individuals in the population),
size fraction from the suspended or deposited portion in the 4. Certain parameters for controlling the run, and
source cell (j from, k from) to the suspended portion of the 5. The termination criterion and method for designating the
sink cell (j to, k to) according to the scheme described. result of the run.
The first two preparatory steps specify the ingredients that are
available to create the computer programs. A run of genetic
V. DEVELOPMENT OF GENETIC ALGORITHM programming is a competitive search among a diverse
The goal of getting computers to automatically solve problems population of programs composed of the available functions
is central to artificial intelligence, machine learning, and the and terminals. The identification of the function set and
broad area encompassed by what Turing called “machine terminal set for a particular problem (or category of problems)
intelligence” (Turing 1948, 1950). In his 1983 talk entitled is usually a straightforward process. For some problems, the
“AI: Where It Has Been and Where It Is Going, machine function set may consist of merely the arithmetic
learning pioneer Arthur Samuel stated the main goal of the functions of addition, subtraction, multiplication, and division
fields of machine learning and artificial intelligence”: as well as a conditional branching operator. The terminal set
Genetic programming is a systematic method for getting may consist of the program’s external inputs (independent
computers to automatically solve a problem starting from a variables) and numerical constants. For many other problems,
high-level statement of what needs to be done. Genetic the ingredients include specialized functions
and terminals. For example, if the goal is to get genetic Accum(I+i-2,J) = Accum(I+i-2,J) +
programming to automatically program a robot to mop the Accum(i,j);
entire floor of an obstacle-laden room, the human user must
tell genetic programming what the robot is capable of doing. end;
For example, the robot may be capable of executing functions
such as moving, turning, and swishing the mop. If the goal is %Set the accumulation over the interior
the automatic creation of a controller, the function set may points of the eastern boundary
consist of integrators, differentiators, leads, lags, gains, adders, for i=2:M-1 %the column (x-value, or E-
subtractors, and the like and the terminal set may consist of value) is set to the end, N
signals such as the reference signal and plant output. If the
goal is the automatic synthesis of an analog electrical circuit, j=N;
the function set may enable genetic programming to construct [temp,I]=min(Psi(i-1:i+1,j));
circuits from components such as transistors, capacitors, and [I,J]=ind2sub([M,N],I);
resistors. Once the human user has identified the primitive Accum(I+i-2,J) = Accum(I+i-2,J) +
ingredients for a problem of circuit synthesis, the same Accum(i,j);
function set can be used to automatically synthesize an
amplifier, computational circuit, active filter, voltage reference end;
circuit, or any other circuit composed of these ingredients.
The third preparatory step concerns the fitness measure for the %Set the accumulation over the interior
problem. The fitness measure specifies what needs to be done. points of the northern boundary
The fitness measure is the primary mechanism for for j=2:N-1 %the column (y-value, or N-
communicating the high-level statement of the problem’s value) is set to 1
requirements to the genetic programming system. For
example, if the goal is to get genetic programming to i=1;
automatically synthesize an amplifier, the fitness function is [temp,I]=min(Psi(i,j-1:j+1));
the mechanism for telling genetic programming to synthesize [I,J]=ind2sub([M,N],I);
Accum(I,J+j-2) = Accum(I,J+j-2) +
a circuit that amplifies an incoming signal (as opposed to, say,
Accum(i,j);
a circuit that suppresses the low frequencies of an incoming
signal or that computes the square root of the incoming
end;
signal). The first two preparatory steps define the search space
whereas the fitness measure implicitly specifies the search’s
%Set the accumulation over the interior
desired goal. The fourth and fifth preparatory steps are
points of the southern boundary
administrative. The fourth preparatory step entails specifying
for j=2:N-1 %the column (y-value, or N-
the control parameters for the run. The most important control
value) is set to end
parameter is the population size. Other control parameters
include the probabilities of performing the genetic operations, i=M;
the maximum size for programs, and other details of the run. [temp,I]=min(Psi(i,j-1:j+1));
The fifth preparatory step consists of specifying the [I,J]=ind2sub([M,N],I);
termination criterion and the method of designating the result Accum(I,J+j-2) = Accum(I,J+j-2) +
of the run. The termination criterion may include a maximum Accum(i,j);
number of generations to be run as well as a problem-specific
success predicate. The single best-so-far individual is then end;
harvested and designated as the result of the run.
%Set the accumulation over the corner
points of the grid boundary
%First: NorthWest corner
VI. IMPLEMENTATION OF GENETIC ALGORITHM IN [temp,I]=min(Psi(1:2,1:2));
MATLAB [I,J]=ind2sub([M,N],I);
Coding for different subroutines have been developed in the Accum(I,J) = Accum(I,J) + Accum(1,1);
following paragraph:
%Set the accumulation over the interior %Set the accumulation over the corner
points of the western boundary points of the grid boundary
for i=2:M-1 %the column (x-value, or E- %Second: SouthWest corner
value) is set to 1 [temp,I]=min(Psi(end-1:end,1:2));
[I,J]=ind2sub([M,N],I);
j=1; Accum(I+i-1,J+j-1) = Accum(I+i-1,J+j-1) +
[temp,I]=min(Psi(i-1:i+1,j)); Accum(end,1);
[I,J]=ind2sub([M,N],I);
%Set the accumulation over the corner
points of the grid boundary
%Second: NorthEast corner % V - velocity vector in the geocentric
[temp,I]=min(Psi(1:2,end-1:end)); equatorial frame
[I,J]=ind2sub([M,N],I); % (km)
Accum(I+i-1,J+j-1) = Accum(I+i-1,J+j-1) + % r, v - the magnitudes of R and V
Accum(1,end); % vr - radial velocity component (km/s)
% H - the angular momentum vector
%Set the accumulation over the corner (kmˆ2/s)
points of the grid boundary % h - the magnitude of H (kmˆ2/s)
%Second: SouthEast corner % incl - inclination of the orbit (rad)
[temp,I]=min(Psi(end-1:end,end-1:end)); % N - the node line vector (kmˆ2/s)
[I,J]=ind2sub([M,N],I); % n - the magnitude of N
Accum(I+i-1,J+j-1) = Accum(I+i-1,J+j-1) + % cp - cross product of N and R
Accum(end,end); % RA - right ascension of the ascending
node (rad)
%Find the channels over the total % E - eccentricity vector
interior grid cells % e - eccentricity (magnitude of E)
% eps - a small number below which the
for(i=2:M-1) %sum over number of eccentricity is
northward cells (rows) % considered to be zero
for(j=2:N-1) %sum over number of % w - argument of perigee (rad)
eastward cells (columns) % TA - true anomaly (rad)
% a - semimajor axis (km)
% Assign values to variable input % pi - 3.1415926...
arguments. % coe - vector of orbital elements [h e
[temp,I]=min(Psi(i-1:i+1,j- RA incl w TA a]
1:j+1)); %
[I,J]=ind2sub([M,N],I); % User M-functions required: None
Accum(I+i-2,J+j-2) = Accum(I+i- % ---------------------------------------
2,J+j-2) + Accum(i,j); ---------------------
global mu;
end; eps = 1.e-10;
end; r = norm(R);
v = norm(V);
[temp,I] = sort(Accum,1,'descend'); vr = dot(R,V)/r;
for j=1:N, H = cross(R,V);
channel(I(1:numChans,j),j)=temp(1:numChan h = norm(H);
s,j); end; incl = acos(H(3)/h);
% for j=1:N, N = cross([0 0 1],H);
channel_dz(I(1:numChans,j),j)=realbed'(1: n = norm(N);
3,j); end; if n ? = 0
RA = acos(N(1)/n);
if(strcmp(plotopt,'plot')) if N(2) < 0
subplot(2,1,1); surf(flipud(Psi)); RA = 2*pi - RA;
view([0,90]); axis tight; end;
title('Potential'); xlabel('E-W'); else
ylabel('N-S'); RA = 0;
subplot(2,1,2); image(channel); axis end;
tight; title('Channel Locations'); E = 1/mu*((vˆ2 - mu/r)*R - r*vr*V);
end; e = norm(E);
Calculation of ORBITAL VECTOR from STATE VECTOR if n ? = 0
is shown in the following coding: if e > eps
% This function computes the classical w = acos(dot(N,E)/n/e);
orbital elements (coe) if E(3) < 0
% from the state vector (R,V) w = 2*pi - w;
% end;
% mu - gravitational parameter (kmˆ3/sˆ2) else
% R - position vector in the geocentric w = 0;
equatorial frame end;
% (km) else
w = 0;
end;
if e > eps [4] Patankar, S.V “Numerical Heat Transfer and Fluid Flow”,
TA = acos(dot(E,R)/e/r); Hemisphere Publication, ISBN-10: 0891165223, 1980
if vr < 0 [5] Cebeci, Tuncer, Jian P Shao, Fassi Kafyeke, Eric
TA = 2*pi - TA; Laurendeau “Computational Fluid Dynamics for Engineers”
end; Springer Publication
else [6] Oertel, Herbert “ Prandtl’s Essentials of Fluid Mechanics”
cp = cross(N,R); Springer Publication
if cp(3) >= 0 [7] Schlichting, Hermann, K Gersten “Boundary Layer
TA = acos(dot(N,R)/n/r); Theory”, Springer Publication
else [8] G K Batchelor “An Introduction to Fluid Dynamics”,
TA = 2*pi - acos(dot(N,R)/n/r); Cambridge Mathematical Library
end; [9] Pjush Kundu, Ira Kohen “Fluid Mechanics” 3rd Edition,
end; Elsevier Academic Press
a = hˆ2/mu/(1 - eˆ2);
coe = [h e RA incl w TA a];

VII. CONCLUSION
There is quite a huge application of genetic algorithm in the
field of civil engineering and environmental science. To
calculate the Stumpff function S(z) and C (z) and to calculate
the state vector from Kepler’s equation is the best application
of orbital mechanics in this area. Numerical simulation can be
easier if the programs are modified with the new advent of
genetic algorithm like:
 Constrained Syntatic Structure
 Automatically defined variables
 Automatically Defined iterations (ADI) and
Automatically Defined Loops (ADL)
Besides that genetic programming solvers are now available
for fast computation. Wide application of this field in waste
engineering like incineration and composting is really a new
methodology.
At present genetic programming is certainly not in a position
to produce computer programs that would pass the full Turing
test for machine intelligence, and it might not be ready for this
immense task for centuries. Nonetheless, thanks to the
constant technological improvements in genetic programming
technology, in its theoretical foundations and in computing
power, genetic programming has been able to solve tens of
difficult problems with human-competitive results in the
recent past. It is, indeed, arguable that in a few years’ time
genetic programming will be able to routinely and competently
solve important problems for us in a variety of specific
domains of application, even when running on a single
personal computer, thereby becoming an essential collaborator
for many of human activities. This, we believe, will be a
remarkable step forward towards achieving true, human
competitive machine intelligence.

REFERENCE
[1] Anderson, John D, Jr “Computational Fluid Dynamics”,
McGraw-hill, Inc.NY
[2] Anderson, John D, Jr “Fundamentals of Aerodynamics”
McGraw-Hill, Inc, NY
[3] Ferziger Joel H, Peric Milovan “ Computational Methods
for Fluid Dynamics” 3rd ed, Springer Publication, 2003

You might also like