CSE 351 IT 351 Modeling and Simulation Mesh

  • Slides: 27
Download presentation
CSE 351/ IT 351 Modeling and Simulation Mesh Models Dr. Jim Holten

CSE 351/ IT 351 Modeling and Simulation Mesh Models Dr. Jim Holten

Mesh Models Background – Representing data from the real world Mesh Types Model Implementation

Mesh Models Background – Representing data from the real world Mesh Types Model Implementation via Matrices Model Implementation using SRF

Background How do we represent a continuum? How do we represent a deformable object?

Background How do we represent a continuum? How do we represent a deformable object? How do we represent disjoint parts?

Representing a Continuum Field equations (analytical) Mesh points (discrete locations) Mesh “cells” (discrete objects)

Representing a Continuum Field equations (analytical) Mesh points (discrete locations) Mesh “cells” (discrete objects) Combinations

Continuum Field Equations Gravitation Electric charges Magnetic Evenly fields propagated point source radiated energy

Continuum Field Equations Gravitation Electric charges Magnetic Evenly fields propagated point source radiated energy

Continuum Mesh Points Attributed Fixed values at each point grid points Mobile grid points

Continuum Mesh Points Attributed Fixed values at each point grid points Mobile grid points Arbitrary (strategically placed) points Multi-mesh points

Continuum Mesh Combinations Objects, particles, and fields Radiation transport and collisions Protein models Satellite

Continuum Mesh Combinations Objects, particles, and fields Radiation transport and collisions Protein models Satellite orbits Integrated systems Boundary transports

Continuum Mesh Cells Point locations and attributes Attribute values over line, surface, or volume

Continuum Mesh Cells Point locations and attributes Attribute values over line, surface, or volume regions (1 -D, 2 -D, or 3 -D) May form a hierarchy of cell types Node (Point) Edge (Line between points) Face (Surface bounded by lines) Zone (Volume bounded by surfaces)

Mesh Cell Behavior Types Fixed positions (Eulerian Mesh) Adaptive positions (Lagrangian Mesh) Crushing collision

Mesh Cell Behavior Types Fixed positions (Eulerian Mesh) Adaptive positions (Lagrangian Mesh) Crushing collision surface Wavefront deformation Adaptive refinement for finer localized representation Assemblies of parts Separate “independent objects” Boundaries

Implementing a Mesh Model Choose a model object representation Represent the state variables (properties

Implementing a Mesh Model Choose a model object representation Represent the state variables (properties of the represented objects) Organize the model calculations (state variable calculations for each time step) Decide how to view the time step values

State Variables State variables are EVERY variable that changes over time and must be

State Variables State variables are EVERY variable that changes over time and must be carried from time step to time step. State variables are mostly “attributes” (properties) of the elements. State variables generally are in vectors whose value entries correspond to the cells in a single cell set.

State Variable Representations Each has its own data type, depending on what it represents.

State Variable Representations Each has its own data type, depending on what it represents. Commonly float or double, may also be integer, enumerated value, vector, string, or. . . Generally loosely interpreted as meaning ANY attribute of an element or of the model itself.

State Variable Calculations Inputs to calculations: State variable values (one or many) Constants and

State Variable Calculations Inputs to calculations: State variable values (one or many) Constants and coefficients Element associations Outputs New state variable values

State Variable Calculations Temporary variables may or may not be considered state variables. Calculations

State Variable Calculations Temporary variables may or may not be considered state variables. Calculations may be iterated many times over for each of many inputs (A differential equation solver or integrator) or be simple expression evaluation as in (a = b). A state variable could be the state of a lesser (limited scope) Finite State Machine.

State Variable Calculations Generally best to organize the calculations to iterate through the output

State Variable Calculations Generally best to organize the calculations to iterate through the output values, calculating each before going on. Each mesh cell has its own state variables, and it often is best to compute all for one cell at a time, but some algorithms require one attribute for all cells before the next attribute can be calculated.

State Variable Calculations Selecting the order to do calculations among attributes can be a

State Variable Calculations Selecting the order to do calculations among attributes can be a precedence-based scheduling problem. Work to keep it as simple as possible!! Use comments to inform source code readers why you have used a specific ordering or technique!

Choose a Model Object Representation Finite Elements? (Pick from a zoo of predefined cell

Choose a Model Object Representation Finite Elements? (Pick from a zoo of predefined cell element types) Regular Polyhedral Mesh? (Homogeneous mesh cells) General Polyhedral Mesh? (Hierarchy of generalized cells) Any combination of the above?

Model Cell Criteria Cell shapes? Cell properties (attributes)? Cell associations with neighbor cells? Cell

Model Cell Criteria Cell shapes? Cell properties (attributes)? Cell associations with neighbor cells? Cell associations with other cell set members? Complexities of developing supporting code?

Finite Element Cell Types 1 -D: Line, interpolated line, spline 2 -D: Triangle, rectangle,

Finite Element Cell Types 1 -D: Line, interpolated line, spline 2 -D: Triangle, rectangle, trapezoid, circle, ellipse, interpolated shape variations 3 -D: Tetrahedral, hexahedral, spherical, ellipsoidal Special types: Springs, shock absorbers, circuit components, other custom variations

Regular Polyhedral Cell Types Limited to “regular” shapes that will cover a “region”. 1

Regular Polyhedral Cell Types Limited to “regular” shapes that will cover a “region”. 1 -D: No problem. 2 -D: Triangles, quadrangles, and hexagons only. 3 -D: Hexahedrals only. Does not cover irregularly shaped model objects/parts.

General Polyhedral Cell Types A hierarchy of cells (nodes, edges, faces, and zones). 0

General Polyhedral Cell Types A hierarchy of cells (nodes, edges, faces, and zones). 0 -D: node (point) has a location (usually) 1 -D: edge (line) connects two end points (nodes). 2 -D: face is surrounded by edges. 3 -D: zone is surrounded by faces. Fully generalized polyhedral shapes, allowing extreme shape representation.

Matrix Representations of Mesh Models Vectors Each is over a single cell set (which

Matrix Representations of Mesh Models Vectors Each is over a single cell set (which is always made up of a single cell type) o o Each contains values for a single property for each cell in the cell set Matrices Each matrix represents an association between values for a pair of cell sets o Each may be a “flag” (1 or 0) or may have an association value (constant coefficient) o Some are used as transformations to “relate” vector values in linear equations for the time step calculations o Commonly used for sets of homogeneous cell types

Matrix Mesh Model Vectors of cell set member attributes (property values) One value for

Matrix Mesh Model Vectors of cell set member attributes (property values) One value for each cell in the cell set May be scalars, vectors, matrices, tensors, strings, enumerated values (hot/warm/cold, on/off, . . . ), or ? Examples Volume temperature, material makeup, mass, density, pressure, . . . Point coordinates (1 -D, 2 -D, or 3 -D usually) Each entry a vector of flow through a surface

Matrix Mesh Model Matrices Represent relations which indicate o cell adjacency within a set

Matrix Mesh Model Matrices Represent relations which indicate o cell adjacency within a set of cells o cell associations between cell sets May contain values representing o Cell interaction properties (weights, coefficients) o Linear state value propagator coefficients Stochastic covariance values for property values between cell pairs o

Matrix Mesh Model Characteristics Most model matrices are sparse Matrix math does NOT handle

Matrix Mesh Model Characteristics Most model matrices are sparse Matrix math does NOT handle nonlinearities well, so nonlinearities must be handled as separate expressions for each transformation. Matrix representations do NOT clearly indicate organization at higher levels of abstraction. It is easy to get lost in the code and data relationships at all levels. Parallel partitioning can be awkward.

Viewing Time Step Values Generally state variable combinations are valid only between (not during)

Viewing Time Step Values Generally state variable combinations are valid only between (not during) time steps. That is when to view them (except for debugging purposes). Sometimes auxiliary state variables are created JUST so they can be viewed!!

Viewing Time Step Values Print the values. Plot the values. Use the values to

Viewing Time Step Values Print the values. Plot the values. Use the values to adjust visual “meters” or other indicators. Use the values to adjust images on virtual displays. Save the values for a later animation. Postprocess the values for a custom view.