MEE 452: Ch.5-System Simulation • Modeling: • Simulation: describe physical systems

advertisement
MEE 452: Ch.5-System Simulation
• Modeling:
describe physical systems
with equations
• Simulation:
use modeling to simulate
outcome/result of systems
- usually with a time-like independent variable
Intro: Simulation degree of validity
Replicatively valid (a minimum):
matches existing data
Predictably valid (desirable & risky):
predicts data outside existing ones
Structurally valid (the best and the hardest):
truly reflects real-system operation
Intro: System Simulation Methods
Many different simulation methods - usually with a time-like
independent variable:
Discreet:
change by a discreet amounts (steps),
like queuing systems
Continuous:
continuous changes
Deterministic:
not uncertain input variables
Stochastic:
input is random or
has some probability distribution
A system SIMULATION process
INPUT:
System to be simulated
Task 1:
develop system math model
Task 2:
develop simulation math model
Task 3:
develop simulation computer program
Task 4:
test and verify the simulation
OUTPUT:
System simulation
There are many high-level computer programs: SIMULINK, etc.
Principles of Modeling and Simulation
• Physical bases: (critical!)
Model need to represents the physics of the components and
interactions among them
• Levels of the components: (matching!)
From simple equation to ordinary and partial diff. Eqs and
system od eqs.
• Accuracy: (use sensitivity analysis, y/ x)
Simulation output fidelity with respect to the real system
behavior. Depends on comp. level matching.
• Validation procedure: (at least!)
Examine for inconsistencies and replicate some known data.
It is an engineering task, not mathematical task (GIGO).
General Thermal System Correlations:
For any property S in a control volume CV:
In the rate form (.../ t):
Flux of a property:
S
Sin  Sout  store
W
S  POTENTIAL
RRESISTANCE
Lumped-mass technique:

EXAMPLE
t
Sin  Sout  S store
0
STEADY STATE
T
 qHEAT FLUX
Rthermal
qin  qout    c Vvolume T
t
General Conservation Law(s)
For any property SP: mass, energy, entropy,
Property ACCUMULATION
availability…:

P


p (  dV ) 

t CV
t Control
Volume
[CV Accumulation]rate=
=[(In-Out) + (Production-Distraction)]CS rate
Property TRANSFER
 [In-Out]rate=
PIn Out
Property TRANPORT
 





  p flux  dA   p (  U  dA)
Control
Surface
Control
Surface
 [Accumulation]rate= 0 for a steady flow process
 [(Production-Distraction)]rate = 0 for mass and energy
 [Production =s] rate  0 for entropy
 [Distraction =I =T0s] rate  0 for availability (exergy)
Data (Graph/Table) Curve Fitting
• First, functional form
-must be selected based on experience
• Parametric representations
GO
-for smooth data use # of pts. equal to
# of curve-fit coefficients
• Least-Square method
GO
-for scattered (non-smooth) data
GO
• Interpolation: Many methods: Splines,
Lagrange polynomial (like quadratic thru 3 pts.),
etc.
Least-Square Regression
Arbitrary (our choice function): yc
yc ,i  f ( xi , a0 , a1 ,...a j , ...am )
y
where aj are coefficients to be found
The sum of deviations squared
should be minimum :
2
D   d i  (yi  yc , i ) 2  min
yi
yc,i
i
i  1,2,...n
i
(yi  yc , i )  d i
x
xi
Given data points: { xi , yi }, i  1,2,...n
Standard Deviation of the Curve-fit
Sxy
y
Sxy
d min < {Sxy  d RMS
S xy 
yi
yc,i
1
n
}< d
avg
. max
2

(y
y
)
 i c,i
i
yc(x) ± tnP%Sxy
(yi  yc , i )  d i
x
xi
Given data points: { xi , yi }, i  1,2,...n
Simulation...
• Hardy-Cross revisited ( remember )
• Steady-State Simulation
GO to Example 5-4: Oil cooling
• Transient Simulation
-remember the Lumped-mass method [diff.
Equation(s)]
Download