6: Model Outputs

Follow

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 Wave propagation example, we require acoustic pressure, stress and the maximum acoustic pressure, SGXX and SGYY stress components:

calc
    pres acoustic            /* calculate acoustic pressure
    strs                     /* calculate stress          
    max aprs none pmax    /* calculate maximum pressure field
    max sgxx none sgxxmax /* calculate maximum stress component field
    max sgyy none sgyymax /* calculate maximum stress component field
    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 section: Model Execution.

For our Wave Propagation example, we want to extract the time function, acoustic pressure and a stress component at the front and back of the void defect:

c request time domain outputs - graphs of data vs time
pout
hist func /* time function - array '1'
hist aprs $i2 $i2 1 $j1 $j1 1   /* acoustic pressure at the front of defect - array '2'
hist aprs $i3 $i3 1 $j1 $j1 1   /* acoustic pressure at the back of defect - array '3'
hist sgxx $i2 $i2 1 $j1 $j1 1 /* stress (xx) at the front of defect - array '4'
hist sgxx $i3 $i3 1 $j1 $j1 1   /* stress (xx) at the back of defect - array '5'
end

Tutorial Tasks

Within the Wave_Prop.flxinp file:

  1. Using the calc command - add in calculated properties for acoustic pressure (aprs), stress (strs) and maximum acoustic pressure, stress XX (sgxx) and YY (sgyy) components (max)
  2. Using the pout command extract the following time histories :
    • the time function (func) using hist subcommand
    • acoustic pressure at the front (i2) and back (i3) of the void defect
    • stress XX component at the front (i2) and back (i3) of the void defect

Progress to tutorial section: Process Model

Tutorial Code

c outputs

calc
pres acoustic /* calculate acoustic pressure strs /* calculate stress     max aprs none pmax    /* calculate maximum pressure field
    max sgxx none sgxxmax /* calculate maximum stress component field
    max sgyy none sgyymax /* calculate maximum stress component field
    end

c request time domain outputs - graphs of data vs time
pout
hist func /* time function - array '1'     
hist aprs $i2-1 $i2-1 1 $j1 $j1 1   /* acoustic pressure at the front of defect - array '2'
    hist aprs $i3 $i3 1 $j1 $j1 1   /* acoustic pressure at the back of defect - array '3'
    hist sgxx $i2-1 $i2-1 1 $j1 $j1 1   /* stress (xx) at the front of defect - array '4'
    hist sgxx $i3 $i3 1 $j1 $j1 1   /* stress (xx) at the back of defect - array '5'
    end
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.