Introduction To Simulation - Lecture 1: Example Problems and Basic Equations
Introduction To Simulation - Lecture 1: Example Problems and Basic Equations
Thanks to Deepak Ramaswamy, Michal Rewienski, Luca Daniel, Shihhsien Kuo and Karen Veroy
Outline
Uses For Simulation
Engineering Design Virtual Environments Model Verification
Circuit Analysis
Equations
Current-voltage relations for circuit elements (resistors, capacitors, transistors, inductors), current balance equations
Recent Developments
Matrix-Implicit Krylov Subspace methods
Recent Developments
Fast Solvers for Integral Formulations
Recent Developments
Meshless Methods, Iterative methods, Automatic Error Control
Recent Developments
Multigrid Methods for Unstructured Grids
Recent Developments
Fast Integral Equation Solvers, Monte-Carlo Methods
Recent Developments
Fast Integral Equation Solvers, Matrix-Implicit Multi-level Newton Methods for coupled domain problems.
t
Equations
Black-Scholes Partial Differential Equation
Recent Developments
Financial Service Companies are hiring engineers, mathematicians and physicists.
Recent Developments
Multirate integration methods, parallel simulation
Virtual Surgery
Equations
Partial Differential Equations of Elastomechanics
Recent Developments
Parallel Computing, Fast methods
+- +-
- - + + +
+
-+
Receptor (protein molecule)
Ecm protein
Recent Developments
Matrix-Implicit Iterative Methods, Fast Integral Equation Solvers
Works!
D R O P C L A S S
No
Faster Method
Right Algorithms
Robust Method
New Algorithms
Happiness
Fame
Course Philosophy
Examine Several Modern Techniques
Understand, practically and theoretically, how the techniques perform on representative, but real, applications Why Prove Theorems? Guarantees, given assumptions, that the method will always work. Can help debug programs. The theorem proof can tell you what to do in practice.
+ 3.3 v
Cache
ALU
Decoder
One application problem which generates large systems of equations is the problem of distributing power to the various parts of a Very Large Scale Integrated (VLSI) circuit processor. The picture on the left of the slide shows a layout for a typical processor, with different functional blocks noted. The processor pictured has nearly a million transistors, and millions of wires which transport signals and power. All one can really see be eye are the larger wires that carry power and patterns of wires that carry signals, boolean operations such as and and or . A typical processor can be divided into a number of functional blocks, as diagrammed on the layout on the left. There are caches, which store copies of data and instructions from main memory for faster access. There are execution units which perform boolean and numerical operations on data, such as and, or , addition and multiplication. These execution units are often grouped together and referred to as an Arithmetic Logic Unit (ALU). Another main block of the processor is the instruction decoder, which translates instructions fetched from the cache into actions performed by the ALU. On the right is a vastly simplified diagram of the processor, showing a typical 3.3 volts power supply, the 3 main functional blocks, and the wires (in red) carrying power from the supply to the 3 main functional blocks. The wires, which are part of the integrated circuit, are typically a micron thick, ten microns wide and thousands of microns long ( a micron is a millionth of an inch). The resistance of these thin wires is significant, and therefore even though the supply is 3.3 volts, these may not be 3.3 volts across each of the functional blocks. The main problem is we address is whether or not each functional block has sufficient voltage to operate properly.
Joint Beam
Droop Cargo
Vehicle
In the diagram is a picture of a space frame used to hold cargo (in red) to be lowered into a vehicle. The space frame is made using steel beams(in yellow) that are bolted together at the purple joints. When cargo is hanging off the end of the space frame, the frame droops. The main problem we will address is how much does the space frame droop under load.
Thermal Analysis
Above is a picture of an engine block, which is typically solid steel or aluminum. The heat generated by the gas burning in the cylinders must be conducted through the engine block to a wide enough surface area that the heat can be dissipated. If not, the engine block temperature will rise too high and the block will melt.
+ 3.3 v
Cache
ALU
Decoder
Select topology and metal widths & lengths so that a) Voltage across every function block > 3 volts b) Minimize the area used for the metal wires
Select topology and Strut widths and lengths so that a) Droop is small enough b) Minimize the metal used.
Thermal Analysis
Select the shape so that a) The temperature does not get too high b) Minimize the metal used.
Given the topology and metal widths & lengths determine a) The voltage across the ALU, Cache and Decoder. b) The droop of the space frame under load.
IBM, Motorola, TI, Intel, Compaq, Sony, Hitachi Non functional prototype costs - Increases time-to-market - Design rework costs millions
Once a VLSI circuit is designed, it is fabricated using a sequence of sophisticated deposition and etching processes which convert a wafer of Silicon into millions of transistors and wires. This processing can take more than a month. If the circuit does not function, the design flaw must be found and the fabrication process restarted from the beginning. For this reason, just a few design errors can delay a product for months. In a competitive market, this delay can cost millions in lost revenue in addition to the cost of redesigning the circuit. In order to avoid fabricating designs with flaws, companies make extensive use of simulation tools to verify design functionality and performance.
Small companies make application circuits disk drives, graphics accelerators, CD players, cell phones. What is the cost of non-functional prototypes ? - Out of business.
Thousands of small companies design VLSI circuits for applications as diverse as peripherals for personal computers as well as signal processors for audio, video and automotive applications. These small companies cannot afford the cost of fabricating prototype designs that do not function. The very survival of these companies depends on using simulation tools to verify designs before fabrication.
1.3 billion 3.8 billion 1.5 billion 6.9 billion .6 billion 1.4 billion
+ 3.3 v
Cache
ALU
Decoder
Power supply provide current at a certain voltage. Functional blocks draw current. The wire resistance generates losses.
SMA-HPC 2003 MIT
25
Each of the elements in the simplified layout, the supply, the wires and the functional blocks, can be modeled by relating the voltage across that element to the current that passes through the element. Using these element constitutive relations, we can construct a circuit from which we can determine the voltages across the functional blocks and decide if the VLSI circuit will function.
Supply becomes
A Voltage Source
Power supply
current
V
+ Vs
V = Vs
Constitutive Equation
+ Voltage
Physical Symbol Current element
The power supply provides whatever current is necessary to ensure that the voltage across the supply is maintained at a set value. Note that the constitutive equation (in the figure) , which is supposed to relate element voltage (V) to element current (I) does not include current as a variable. This should not be surprising since voltage is always maintained regardless of how much current is supplied, and therefore knowing the voltage tells one nothing about the supplied current.
+
ALU
V
Is
I = Is
Constitutive Equation
Physical Symbol
Circuit Element
The functional blocks, the ALU, the cache and the decoder are complicated circuits containing thousands of transistors. In order to determine whether the functional block will always have a sufficient voltage to operate, a simple model must be developed that abstracts many of the operating details. A simple worst-case model is to assume that each functional block is always drawing its maximum current. Each block is therefore modeled as a current source, although one must assume that the associated currents have been determined by analyzing each functional block in more detail. Note that once again the constitutive equation is missing a variable, this time it is voltage. Since a current source passes the same current independent of the voltage across the source, that V is missing should be expected.
I
Physical Symbol
IR V = 0
Constitutive Equation (Ohms Law)
Circuit model
The model for the wires connecting the supply to the functional blocks is a resistor, where the resistance is proportional to the length of the wire ( the current has further to travel) and inversely proportional to the wire cross-sectional area ( the current has more paths to choose).
low Resistance
high Resistance
That the current through a resistor is proportional to the voltage across the resistor is Ohms law.
IC
Cache
+ -
IALU
ALU
ID
Decoder
Power Supply voltage source Functional Blocks current sources Wires become resistors Result is a schematic
To generate representation which can be used to determine the voltages across each of the functional units, consider each of the models previously described. First, replace the supply with a voltage source. Second, replace each functional block with an associated current source. Third, replace each section of wire with a resistor. Note that the resistors representing the wires replace a single section with no branches, though the section can have turns. The resulting connection of resistors, current sources and voltage sources is called a circuit schematic. Formulating equations from schematics will be discussed later.
Ground
Load
In order to examine the space frame, we will consider a simplified example with only four steel beams and a load. Recall that the purple dots represent the points where steel beams are bolted together. Each of the elements in the simplified layout, the beams and the load, can be modeled by relating the relative positions of the elements terminals to the force produced by the element. Using these element constitutive relations, we can construct a schematic from which we can determine the frames droop.
Load becomes
Force Source
Fload
Mass Schematic Symbol x
Fx = 0 Fy = Fload
Constitutive Equation
Physical Symbol
The load is modeled as a force pulling in the negative Y direction ( Y being vertical, X being horizontal). Note that the constitutive equation does not include the variable for the loads position, following from the fact that the loads force is independent of position.
Beam becomes
Strut
x1 , y1
v f
L = (x1 x2 )2 + ( y1 y2 )2 v L L f = EAc 0 L0
Constitutive Equation (Hookes Law)
x2 , y2
Design Parameters
E = Young's Modulus
Material Property
In order to model the steel beams in a space frame, it is necessary to develop a relation between the beam deformation and the restoring force generated by the beam. To derive a formula we will make several assumptions. 1) The beam is perfectly elastic. This means that if one deforms the beam by applying a force, the beam always returns to its original shape after the force is removed.
Apply force
Remove force
Lo
2) The beam does not buckle
L1 > Lo
buckling
Lo
Lo
Buckling is an important phenomenon and ignoring it limits the domain of applicability of this model.
L1 > Lo
3) The beam is materially linear. For a beam to be materially linear, the force which acts along the beam is directly proportional to the change in length.
Lo
f= KL
f=0
f = K L
L1
To determine K consider that the force required to stretch a beam an amount (I) Inversely proportional to its unstretched length (It is easier to stretch a 10 inch rubber band 1 inch than to stretch a 1 inch rubber band 1 inch) (II) Directly proportional to its cross-sectional area (Imagine 10 rubber bands in parallel) (III) Dependent on the material (Rubber stretches more easily than steel). Combining (I), (II) and (III) leads to the formula at the bottom of the slide.
is
Load
To generate a representation which can be used to determine the displacements of the beam joints, consider the models previously described. First, replace the loads with forces. Second, replace each beam with strut.
Heat Flow
1-D Example
Incoming Heat
T (0)
Near End Temperature Unit Length Rod
T (1)
Far End Temperature
T (0)
SMA-HPC 2003 MIT
T (1)
x 36
Heat Flow
Discrete Representation
1) Cut the bar into short sections 2) Assign each cut a temperature
T (0)
T (1)
T1
T2
TN 1 TN
37
Heat Flow
Constitutive Relation
Ti
Ti +1 Ti x
hi +1,i
Limit as the sections become vanishingly small T ( x ) lim x 0 h ( x ) = 38 x SMA-HPC 2003 MIT
Heat Flow
Conservation Law
Ti 1 hi ,i 1
Ti
hi +1,i Ti +1
x Net Heat Flow into Control Volume = 0 SMA-HPC 2003 MIT hi +1,i hi ,i 1 = h s x
39
Heat Flow
Conservation Law
hi +1,i hi ,i 1 = hs x
T i 1 hi , i 1 Ti
x
hi + 1, i Ti + 1
lim x 0 hs ( x ) =
h ( x ) T ( x ) = x x x
40
Heat Flow
Circuit Analogy
1 = R x T1
+ -
TN
+ -
vs = T (0)
is = hs x
vs = T (1)
41
Formulating Equations
Two Types of Unknowns Circuit - Node voltages, element currents Struts - Joint positions, strut forces Conducting Bar Temperature, section heat flows Two Types of Equations Conservation Law Equation Circuit - Sum of Currents at each node = 0 Struts - Sum of Forces at each joint = 0 Bar Sum of heat flows into control volume = 0 Constitutive Equations Circuit element current related to voltage Struts - strut force related to length change Bar section temperature drop related to heat flow
SMA-HPC 2003 MIT
42
vs
3 4
+ -
Given a circuit schematic, the problem is to determine the node voltages and element currents. In order to begin, one needs labels for the node voltages, and therefore the nodes are numbered zero, one, two, N, where N+1 is the total number of nodes. The node numbered zero has a special meaning, it is the reference node. Voltages are not absolute quantities, but must be measured against a reference. To understand this point better, consider the simple example of a current source and a resistor.
0
1
1
In order for one Amp to flow through the resistor, V1 - V0 must equal one volt. But does V1 = 11 volts and V0 =10 volts Or is V1 = 101 volts and V0 = 100 volts ? It really does not matter, what is important is that V1 is one volt higher than V0. So, let V0 define a reference and set its value to a convenient number, V0 = 0.
i5
0 1
i1
i2
i4
i3
The second set of unknowns are the element currents. Obviously, the currents passing through current sources are already known, so one need only label the currents through resistors and voltage sources. The currents are denoted
i1, i2,
i5
i1 + i 5 i 4 = 0
0 1
i2
is 1 i 1 + i 2 = 0
i1
is 2 + is 3 i 2 i 5 = 0
is1
is 2
4
is 3
i3
3
i4
i 4 is1 is 2 i 3 = 0
i 3 is 3 = 0
The conservation law for a circuit is that the sum of currents at each node equals zero. This is often referred to as Kirchoffs current law. Another way to state this law, which more clearly indicates its conservation nature is to say
Any current entering a node must leave the node.
The conservation is that no current is lost, what comes in goes out. The green statement also makes it clear that the direction of the current determines its sign when summing the currents. Currents leaving the node are positive terms in the sum and currents entering the node are negative terms ( one can reverse this convention but one must be consistent).
R5
R2
R2 i2 =V1 V2
2
R1
R1 i1 = 0 V1
R4
R4 i4 =V4 0
4
R3
3
R3 i3 =V3 V4
Use Constitutive Equations to relate branch flow from plus node to minus currents to node voltages (Currents node)
Each element with an unknown branch current has an associated constitutive equation which relates the voltage across the element to the current through the element. For example, consider
R2 in the figure,
V2
i2 R2
V3
V3 and I = i2.
1 V = I R
R I.
Onse should again take note of the direction of the current. If current travels from left node through the resistor to the right node, then the left node voltage will be higher than the right node voltage by an amount