2: Model Inputs

Follow

Default Commands

The first lines of code in a model file should typically start with comments with basic information such as:

  • Author of the Model File
  • Description of the model
  • Date
  • Version Number
  • Any other useful information worth sharing to another OnScale use

 

c
c designer: onscale
c model description: pzt 2d axisymmtric disc
c date: dd/mm/yyyy
c version: 1.0
c

There are 3 lines of commands that usually follow:

  • titl - Provide titling information and identifiers for output results  
  • mp omp - Provide titling information and identifiers for output results 
  • rest - Provide titling information and identifiers for output results  
c set model title
titl training pzt 2d disc example

c use all cores
mp omp * *
c do not save restart file rest no

Parameterisation

Parameterising the model allows changes to applied to your model very quickly and intuitively. We should always be using variables where possible to make setting up the model a simple as possible. For our PZT 2D disc example, we must identify critical dimensions that can be used to fully define the geometry - it is same process a mechanical engineer would go through to draft up a mechanical drawing of a component.

6.PNG

 

Tip: Always use symmetry to reduce model size and simplify the model

As the model will be axisymmetric around the Y axis, we can apply symmetry vertically through the centre of the geometry:

6new.PNG

Note: Although the geometry is quarter symmetric, we cannot apply horizontal symmetry as the electrical loading conditions will not be symmetric across the X-axis. Always be aware of how symmetry will affect other aspects of your model.

3 variables are all that is required to fully define this geometry:

c geometry
symb water_size = 4e-3 /* dimension of water around transducer
symb pzt_rad = 10e-3 /* pzt radius
symb pzt_thk = 2e-3 /* pzt thickness

Tip: For more complex model there will be many more variables so always try to give meaningful variable names
Always maintain consistent units of measurement throughout the model - OnScale typically operates in SI units.

Tutorial Tasks

Within the PZT2D.flxinp file:

  1. Add in basic model file details using comments
  2. Add in titl mp omp and rest commands
  3. Using the symb command creates 3 variables
    • water_size - 4 mm of water around PZT
    • pzt_rad - 10 mm radius of PZT disc
    • pzt_thk - 2 mm thickness of PZT disc

Progress to tutorial section: Meshing

Tutorial Code

c
c designer: onscale
c model description: pzt 2d axisymmtric disc
c date: dd/mm/yyyy
c version: 1.0
c
c set model title
titl training pzt 2d disc example

c use all cores
mp omp * *

c do not save restart file
rest no

c geometry
symb water_size = 4e-3 /* dimension of water around transducer
symb pzt_rad = 10e-3 /* pzt radius
symb pzt_thk = 2e-3 /* pzt thickness


symb water_size = 4e-3 /* dimension of water around transducer
symb pzt_rad = 10e-3 /* pzt radius
symb pzt_thk = 2e-3 /* pzt thickness

 

 

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.