**Boundaries of a Model**

Now that we have fully assigned material to the entire grid, the external boundaries of the water need to be set up correctly to reflect how the areas beyond the model would behave in the real world. OnScale has a number of pre-defined boundary conditions to be applied by the user with the boun side command. The most commonly used boundary conditions are:

**free**- nodes can move freely with no external forces acting upon them
- When to use: edge of model is at

**symm**- boundary for symmetrical geomtries
- assumed that what occurs on one side occurs on the other
- When to use: model is the same geometrically and electrically across the boundary

**absr**- infinite media/load
- energy continues past boundary with no reflections
- When to use: edge of model continues infinitely with the same material (typically a large body of water)

**fixd**- nodes are completely fixed - zero displacement
- energy is perfectly reflected
- When to use: edge of model is infinitely stiff

The model should be set up with the following boundaries to simulate the PZT disc in a infinite body of water:

c boundary conditions & loading c external boundary conditions boun side xmin symm /* assign symmetry condition xmin side of model side xmax absr /* assign absorbing boundary condition (infinite medium) side ymin absr /* to xmax ymin and ymax side side ymax absr end

**Time Functions & Piezoelectric Loads**

The model has now been fully geometrically defined which means we can technically execute the model however, the model will remain static over time. We need to provide some form of input to stimulate the model which typically falls into 2 categories:

- Pressure loads - for simulating purely mechanical wave problems
- Piezoelectric loads - for simulating piezoelectric devices

Before we set up the loading conditions, an input waveform, also referred to as a **Time Function**, is required. OnScale provides a variety of Time Functions to use in the model ranging from sinusoids, wavelets and user-defined functions too. See func for a full list of input types. There is also a Time Function Tool to set up and visualise the input signals to be used within the model.

**Tip:** OnScale recommends using the **Ricker Wavelet (wvlt)** time function due to its broadband performance and low spectral leakage beyond 2.5x the centre frequency.

c define time varying function func wvlt $freqint 1. /* wavelet impulse functionc piezoelectric loads symb ascale = 1 /* area scaling for electrode area - required for accurate simulation of impedance amplitude - '1' for axiy modelpiez wndo $i1 $i2 $j2 $j3 /* define electric window to pzt material - minimise for faster model run time defn top $ascale /* define electrode - name 'top' node $i1 $i2 $j3 $j3 /* assign nodes for top electrode defn bot $ascale /* define electrode - name 'bot' node $i1 $i2 $j2 $j2 /* assign nodes for bottom electrode /* electrical boundary condition bc top volt func /* apply voltage condition to 'top' electrode and assign driving signal 'func' bc bot grnd /* apply ground condition to 'bot' electrode slvr pard /* use pardiso solver - our new faster electrostatic solver for piezo simulations end

Defining the piezoelectric load requires the piez primary command and the following subcommands:

- wndo
- Define the electric window - the region of the grid desginated for the electro-mechanical calculation
- OnScale uses a hybrid method for the calculation by using an implicit (for the electrical calculations)and explicit solver (for the mechanical calculations) to minimise runtime.

**Tip:** Always try to minimise the electric window size to reduce model runtime and memory requirements.

- defn
- To initiate the definition of an electrode within the model with a reference name
- Also used to set the electrode area scaling to accurately simulate the capacitance of a piezoelectric device
- The simulated area must be same as the electrode area on your physical device
- For 2D models - must multiply by the dimension in the unmodelled direction and account for any symmetry conditions (x2 multiplier for each symm condition)
- For 2D axisymmetric models -
**no scaling is required**as solver knows the exact size of device - For 3D models - only need to account for symmetry conditions(x2 multiplier for each symm condition)

- node
- define the exact nodes on the grid to create the electrical boundary
**node**command must follow the**defn**command

- bc
- applies electrical boundary conditions (ground, voltage, open etc...) to the electrodes generated by the
**defn**and**node**commands

- applies electrical boundary conditions (ground, voltage, open etc...) to the electrodes generated by the
- slvr
- Selects the solver to use for the electrostatic calculations.
**pard**is typically the fastest solver especially for large piezoelectric models

**Tip:** Alternative solvers will be slower however, some will offer a solution using much less memory if there are hardware limitations. See slvr.

**Tutorial Tasks**

Within the PZT2D.flxinp file:

- Using the boun primary command apply symmetry (
**symm**) to xmin side and absorbing (**absr**) boundaries to the xmax, ymin and ymax sides using the side subcommand. - Using the func primary command set up the Ricker Wavelet with the wvlt subcommand - set the the frequency argument to
**$freqint**and the peak voltage amplitude to**1V** - Create a symbol variable called
**ascale**and set it to a value of**1**- (used for electrode area scaling) - Using the piez primary command:
- Use the wndo set up the electric window region around the PZT material
**(i1 to i2 & j2 to j3)** - Use the defn subcommand to create an electrode called
**top**and apply the $ascale variable for the area scaling - Use the node subcommand to assign the nodes on the top surface of the PZT to
**top (i1 to i2 & j3 to j3)** - Use the defn subcommand to create an electrode called
**bot**and apply the $ascale variable for the area scaling - Use the node subcommand to assign the nodes on the bottom surface of the PZT to
**bot****(i1 to i2 & j2 to j2)** - Use the bc subcommand to set the
**top**electrode with a voltage (**volt**) type boundary condition and apply the time function (**func**) as the electrical condition - Use the bc subcommand to set the
**bot**electrode with grounded (**grnd**) electrical condition - Use the slvr subcommand to set the electrostatic solver to the PARDISO (
**pard**) solver

- Use the wndo set up the electric window region around the PZT material

Progress to tutorial section: **Model Outputs**

**Tutorial Code**

c boundary conditions & loading c external boundary conditions boun side xmin symm /* assign symmetry condition xmin side of model side xmax absr /* assign absorbing boundary condition (infinite medium) side ymin absr /* to xmax ymin and ymax side side ymax absr end

c define time varying function func wvlt $freqint 1. /* wavelet impulse function c piezoelectric loads symb ascale = 1 /* area scaling for electrode area - required for accurate simulation of impedance amplitude - '1' for axiy model piez wndo $i1 $i2 $j2 $j3 /* define electric window to pzt material - minimise for faster model run time defn top $ascale /* define electrode - name 'top' node $i1 $i2 $j3 $j3 /* assign nodes for top electrode defn bot $ascale /* define electrode - name 'bot' node $i1 $i2 $j2 $j2 /* assign nodes for bottom electrode /* electrical boundary condition bc top volt func /* apply voltage condition to 'top' electrode and assign driving signal 'func' bc bot grnd /* apply ground condition to 'bot' electrode slvr pard /* use pardiso solver - our new faster electrostatic solver for piezo simulations end

## Comments

Please sign in to leave a comment.