**Calculated Properties**

By default OnScale will calculate the velocity arrays for a simulation. Anything that is required beyond these arrays must be requested explicitly in order to be calculated and stored. The most common calculated data arrays are:

- Pressure:
**pres & aprs** - Displacement:
**disp**(accessed through: xdsp, ydsp, zdsp) - Stresses:
**strs**(all 6 components accessed through the sg arrays e.g. sgxx sgyy...) - Strain:
**strn**(all 6 components accessed through ep arrays e.g. epxx epyy...) - Loss:
**loss** - Maximum data arrays:
**max**

For example, the code would look like:

calc pres aprs /* calculate pressure and acoustic pressure disp /* calculate displacement strn /* calculate strain strs /* calculate stress loss /* calculate losses max aprs pmin pmax /* capture minimum & maximum acoustic pressure and store in 'pmin' & 'pmax' array end

For our PZT disc example, we require acoustic pressure, displacements and the maximum acoustic pressure field:

calc pres aprs /* calculate pressure and acoustic pressure disp /* calculate displacement max aprs none pmax /* capture maximum acoustic pressure only and store in 'pmax' array end

**Output Types**

**Time Histories:**

Time Histories in OnScale are simply data fields captured over time for specific nodes/elements in the model.

As a time-domain solver, OnScale can generate any of the calculated data arrays as a set of time histories. All that is required is to request the data at specific locations on the IJK grid which can be done using the pout and the following subcommands:

- hist
- Allows data field time histories to be extracted for nodes and elements on the IJK grid
- Example:

pout hist func /* time function - does not require ijk location hist pres $i1 $i1 1 $j3 $j3 1 /* pressure for a single element hist pres $i1 $i2 1 $j3 $j3 1 /* pressure for every elements in from i1 and i2 hist pres $i1 $i2 2 $j3 $j3 1 /* pressure for every 2nd element from i1 and i2 end

- histname
- Allows time histories to be extracted for specific named objects without the need to input IJK indice locations
- Example:

pout histname electrode vqi all /* voltage, charge & current data for all electrodes defined histname electrode vq top /* voltage & charge data for 'top' electrode histname avrg a all /* store all requested averages histname avrg a avepres /* store the average with name 'avepres' end

All time histories are given an array number in the sequence they are defined. The array numbers gives you access to the data array and can be used for plotting purposes if we want to visualise these signals during the model execution stage. This will be demonstrated later on in the tutorial. For our PZT example, we want to extract the time function, voltage and charge on all electrodes and the Y-displacement at the centre point on the top PZT surface:

pout hist func /* time function - array '1' histname electrode vq all /* voltage and charge data for all electrodes - array '2-5' hist ydsp $i1 $i1 1 $j3 $j3 1 /* y-displacement at node on the top electrode - array '6' end

**Mode Shapes:**

Mode shapes are extracted through Harmonic Analysis methods. In OnScale, we can extract the harmonic behaviour of a system by performing DFTs at specified frequencies of interest. This can also be performed for specific data fields of interest, for example pressure, x-displacement and many others. It is a powerful tool as it can provide insights into system behaviour that may be difficult to achieve in a other ways.

The advantages of performing harmonic analysis in this manner, rather than with a modal solver, is that this method takes into account damping and mode-coupling in a more effective manner. It will therefore correspond more directly with experimental measurements from laser vibrometers taken in a similar manner i.e. driving a system at a constant frequency.

Mode shapes can be created via the shap command. This allows the user to specify the harmonic frequencies (freq) they are interested in along with any additional data fields (data) they wish to extract, for example:

shap data pres /* pressure data to be extracted with mode shapes data xdsp /* x displacement data to be extracted with mode shapes freq 1.5e6 /* mode shape '1' freq 3.e6 /* mode shape '2' end

For our PZT example, we want to extract the mode shape at the frequency of interest $freqint along with the displacement data in the X and Y directions:

shap data xdsp /* x displacement data to be extracted with mode shape data ydsp /* y displacement data to be extracted with mode shape freq $freqint /* mode shape '1' end

**Extrapolation:**

OnScale works most efficiently when models are on the order of tens of wavelengths in size along each axis. Medical and Sonar devices, however, commonly require predictions of pressure amplitudes at distances many hundreds of wavelengths from the source. These are either impractical or inefficient to model fully. The best approach in such cases is to extrapolate.

The Kirchoff extrapolation technique is a powerful tool incorporated into OnScale. It uses analytic techniques (essentially a combination of Green's functions and Huygen's principle) to take pressure/time data from the finite-element model and extrapolate to a full pressure/time response at any arbitrary location or locations.

The technique is valid in both near and far fields, but makes several assumptions:

- Propagating medium is homogenous, i.e., no intervening layers
- Propagating medium is fluid, i.e. no shear waves
- Propagating medium is either lossless or very low loss
- Response is linear

**Tip:** ideally, the extrapolation boundaries should encompass the full device in water but this is not always practical. In such cases, place the boundaries around as much of the device as possible. The boundary should be close but not be in contact with the device, typically 5 - 10 elements from the transducer:

For our PZT example, we will set up a single extrapolation boundary across the top of the device with a few lines of code:

extr defn kirc /* define type extrapolation boundary type - kirchoff ref in $x1 $y2 /* reference point to determine extrapolation vector node $i1 $indgrd-1 $j3+5 $j3+5 /* extrapolation boundary at the defined nodal indices driv func /* storing time function to allow tvr calculation in toolkit end

extr is the extrapolation primary command which contains the subcommands to set up the extrapolation calculation:

- defn
- To define the type of extrapolation boundary type to use - Kirchoff (
**kirc**) is best suited option to use

- To define the type of extrapolation boundary type to use - Kirchoff (
- ref
- To determine which side of extrapolation boundaru to extrapolate out from
- The reference point can be anywhere in your model - you must correctly define whether the point is inside (in) or outside (out) the extrapolation boundary. Outside being the direction of the infinite medium where you are interested in the extrapolated outputs.

- node
- Defines the extrapolation boundary on the model grid using the IJK indices

- driv
- Stores the drive function in the extrapolation output file to allow for Transmit Voltage Response (TVR) calculation.

The analysis of the mentioned outputs will be discussed in more detail in the **Post Processing** section.

**Tutorial Tasks**

Within the PZT2D.flxinp file:

- Using calc command - add in calculated properties for acoustic pressure (
**aprs**), displacements (**disp**) and maximum acoustic pressure (**max**) - Using the pout command:
- extract time histories for the time function (
**func**) using hist subcommand - voltage and charge for all electrodes using histname subcommand
- Y-displacement on the centre of the top PZT surface at (i1,j3) using hist subcommand

- extract time histories for the time function (
- Using the shap command:
- calculate
**xdsp**and**ydsp**with the mode shapes using the data subcommand - request a mode shape at the
**frequency of interest**using the freq subcommand - Using the extr command:
- define the extrapolation surface type as Kirchoff (
**kirc**) with the defn subcommand - set the reference point with the ref subcommand
- apply the boundary 5 nodes away from the top surface of the PZT with the node subcommand
- store the time function with the driv subcommand

- define the extrapolation surface type as Kirchoff (

Progress to tutorial section: **Process Model**

c request calculation of additional arrays calc pres aprs /* calculate pressure and acoustic pressure disp /* calculate displacement max aprs none pmax /* capture maximum acoustic pressure only and store in 'pmax' array end c request time domain outputs - graphs of data vs time pout hist func /* time function - array '1' histname electrode vq all /* voltage and charge data for all electrodes - array '2-5' hist ydsp $i1 $i1 1 $j3 $j3 1 /* y-displacement at node on the top electrode - array '6' end c request mode shape data shap data xdsp /* x displacement data to be extracted with mode shape data ydsp /* y displacement data to be extracted with mode shape freq $freqint /* mode shape '1' end c extrapolation extr defn kirc /* define type extrapolation boundary type - kirchoff ref in $x1 $y2 /* reference point to determine extrapolation vector node $i1 $indgrd-1 $j3+5 $j3+5 /* extrapolation boundary at the defined nodal indices driv func /* storing time function to allow tvr calculation in toolkit end

## Comments

Please sign in to leave a comment.