CSE351/ IT351 Modeling and Simulation Mesh Models Dr. Jim Holten.

27
CSE351/ IT351 Modeling and Simulation Mesh Models Dr. Jim Holten
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    222
  • download

    0

Transcript of CSE351/ IT351 Modeling and Simulation Mesh Models Dr. Jim Holten.

CSE351/ IT351Modeling and Simulation

Mesh Models

Dr. Jim Holten

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?

How do we represent disjoint parts?

Representing a Continuum

Field equations (analytical)

Mesh points (discrete locations)

Mesh “cells” (discrete objects)

Combinations

Continuum Field Equations

Gravitation

Electric charges

Magnetic fields

Evenly propagated point source radiated energy

Continuum Mesh Points

Attributed values at each point

Fixed 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 orbits

Integrated systems

Boundary transports

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 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 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 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 VariableRepresentations

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 coefficients

Element associations

Outputs

New state variable values

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 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 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 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 associations with other cell set members?

Complexities of developing supporting code?

Finite ElementCell 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 PolyhedralCell 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 PolyhedralCell 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 Representationsof Mesh Models

VectorsoEach is over a single cell set (which is always made up of a single cell type)oEach contains values for a single property for each cell in the cell set

MatricesoEach matrix represents an association between values for a pair of cell setsoEach may be a “flag” (1 or 0) or may have an association value (constant coefficient)oSome are used as transformations to “relate” vector values in linear equations for the time step calculations

Commonly used for sets of homogeneous cell types

Matrix Mesh ModelVectors

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 ModelMatrices

Represent relations which indicateocell adjacency within a set of cellsocell associations between cell sets

May contain values representingoCell interaction properties (weights, coefficients)oLinear state value propagator coefficientsoStochastic covariance values for property values between cell pairs

Matrix Mesh ModelCharacteristics

Most model matrices are sparseMatrix 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) 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 ValuesPrint 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.