Chapter 1 Introduction
Computational Methods in Engineering
Lecture Notes by Dr. Mahmoud A. Shouman
Chapter 1 Introduction
1. Computational Methods
Methods that are used to solve mathematical and engineering problems by reforming the
problem to become solvable using coding and programming.
2. Non-computer Methods
Other methods of solutions that cannot be programmed using computer codes or when
there is no meaning in doing that. Examples of that are graphical or analytical solutions.
3. Modeling and Simulation
3.1. Main design phases
1. Building a system.
2. Automated optimization.
3.1.1. Building a system
1. Imagine (Idea).
2. Describing.
3. Schematic capture (Planning).
4. Simulation.
5. Viewing.
6. Examining and modification.
7. Initial design.
3.1.2. Automated optimization
1. Initial design, target, and modified parameters.
2. Optimizer and simulator.
3. Optimized design.
3.2. Analog simulator components
1. Analyzer:
It analyzes input data and checks it for errors.
2. Generator:
It generates data structures to be easy to handle.
3. Equation builder:
It builds the system of equations required to be solved.
4. Equation solver:
It applies computational methods to find a solution.
5. Post processor:
A post processing tool that is used to show and present results.
1 By Dr. Mahmoud A. Shouman
Chapter 1 Introduction
3.3. System
The volume or space that is chosen for the study. It has boundaries with the surrounding
and usually interacts with it. It consists of several objects that relate to each other with
some connections (Figure 1.1).
𝑆𝑦𝑠𝑡𝑒𝑚 = 𝑜𝑏𝑗𝑒𝑐𝑡𝑠 + 𝑐𝑜𝑛𝑛𝑒𝑐𝑡𝑖𝑜𝑛𝑠
External relations should also be defined and the type of the system, whether it is open,
closed, or isolated, should also be demonstrated.
Objects + Connections
Material (mass, energy,
momentum, charge,
species…etc.)
Figure 1-1 System description.
3.3.1. Connections
a) Potentials (across quantity) (Intensive property) [P]:
1. Electric potential (Charge)
2. Pressure (Mass)
3. Temperature (Energy)
4. Velocity or displacement (Momentum)
b) Flows (through quantity) (Extensive property) [F]:
1. Current (Charge)
2. Discharge (Mass)
3. Heat (Energy)
4. Force (Momentum)
At each connection, there is a flow of matter between objects due to change in potential.
For example, current flows from point of high voltage to the point of low voltage and
mass flows from high pressure region to low pressure region.
3.3.2. Objects
a) Passive elements:
1. Static.
2. Dynamic.
b) Sources
1. Independent.
2. Controlled.
2 By Dr. Mahmoud A. Shouman
Chapter 1 Introduction
3.4. Mathematical model components
1. Generic model:
Flows and potentials around the object.
2. Parameters
- Size, physical properties.
- Extracted values.
3.4.1. How to describe a system?
a) Instance description: A given object → Generic model → Parameters values.
b) Model library: A set of generic models for all possible objects.
3.5. Conservation laws
• Mass conservation equation:
𝜕𝜌 𝜕(𝜌𝑢) 𝜕(𝜌𝑣 ) 𝜕(𝜌𝑤 )
+ + + =0 (1.1)
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧
• Momentum conservation equations (Newton’s 2nd law of motion):
𝜕(𝜌𝑢) ⃑ ) = − 𝜕𝑝 + [𝜕𝜏𝑥𝑥 + 𝜕𝜏𝑦𝑥 + 𝜕𝜏𝑧𝑥 ] + 𝜌𝑔𝑥
+ ∇. (𝜌𝑢𝑈 (1.2)
𝜕𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕(𝜌𝑣 ) ⃑ )= − +[ 𝜕𝑝 𝜕𝜏𝑥𝑦 𝜕𝜏𝑦𝑦 𝜕𝜏𝑧𝑦
+ ∇. (𝜌𝑣𝑈 + + ] + 𝜌𝑔𝑦 (1.3)
𝜕𝑡 𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑧
𝜕(𝜌𝑤 ) ⃑ ) = − 𝜕𝑝 + [𝜕𝜏𝑥𝑧 + 𝜕𝜏𝑦𝑧 + 𝜕𝜏𝑧𝑧 ] + 𝜌𝑔𝑧
+ ∇. (𝜌𝑤𝑈 (1.4)
𝜕𝑡 𝜕𝑧 𝜕𝑥 𝜕𝑦 𝜕𝑧
• Energy conservation equation (1st law of thermodynamics):
𝜕(𝜌𝐶𝑣 𝑇) ⃑ ) = − 𝑝∇. 𝑈 + ∇. (𝑘∇𝑇) + 𝑆𝑖 + Φ
+ ∇. (𝜌𝐶𝑣 𝑇𝑈 (1.6)
𝜕𝑡
3.6. Solution requirements
a) Input data:
System, objects (model and parameters), connections (type and location) ...etc.
b) Requirements:
1. Analysis type (transient, steady…etc.).
2. Outputs.
3. Solution (Method, precision…etc.).
4. Distributed (Detailed) vs Lumped Model
1. Distributed model:
• Takes into account the spatial and time effects.
• Described by partial differential equations (PDEs) and boundary conditions.
2. Lumped model:
• Simplifies the spatially distributed system into a simple compact system that is
only dependent on time.
• Described by ordinary differential equations (ODEs) or algebraic equations if
steady and sources.
3 By Dr. Mahmoud A. Shouman
Chapter 1 Introduction
5. Course Outlines
1. Introduction.
2. Errors and error sources.
3. Linear algebraic equations.
4. Non-linear algebraic equations.
5. Basic operations.
6. Ordinary differential equations.
7. Partial differential equations.
6. Required Software
1. MATLAB.
2. ANSYS products.
4 By Dr. Mahmoud A. Shouman