A wrong curve.

I put a transducer on the steel block. The block is pushed vertically upwards. The pointA is located at (0,100). The displacement in the vertically direction should be like figure1. But I get figure2. What's wrong?The force I use is when t<=0.3μs, F=5*(1-cos(pi*t/ts)), when t>0.3μs, F=10, ts=0.3μs.

figure1:

figure2:

my code:

c mem 800 200 /* Allocate 800 megawords of memory - 3 GigaBytes (Not necesarry for Windows Operating Systems)
c NOTE: MEM Command must be first command in file, if used. (Line 1)
rest no 

c ************************************************************************************************************* 

c                 Generated Flex Input File

c ************************************************************************************************************* 

c    DESIGNER            :OnScale - Designer Generated
c    MODEL DESCRIPTION    :
c    DATE CREATED        :27 2ÔÂ 2022
c    VERSION                :1.0
c ************************************************************************************************************* 

mp
    omp * *           /* Number of CPUs to be used in the execution.
    end
 
titl conic 

c ************************************************************************************************************* 

c             Define User Variables 

c ************************************************************************************************************* 

c These variables have been set by the user through the interface.

c ************************************************************************************************************* 

symb coordFactor = 1.0         /* Coordinate conversion factor
symb timeFactor = 1.0         /* Time conversion factor
symb dMassFactor = 1.0         /* Mass conversion factor
symb freqint = 1e+06         /* Determined Drive Frequency (Hz)

c ************************************************************************************************************* 

c             Define Meshing 

c ************************************************************************************************************* 

c             Set the variable for the approximate element size for the model. Must be 
c            sufficient to represent the wavelengths of interest. Recommended that at least 
c            15 elements per wavelength are used.


c ************************************************************************************************************* 

symb freqdamp = $freqint
symb box = 0.0001

c ************************************************************************************************************* 

c             Geometry Locations (XYZ)

c ************************************************************************************************************* 


c Scale Parameters
symb xmin = 0.0 * $coordFactor
symb xmax = 0.25 * $coordFactor
symb ymin = 0.0 * $coordFactor
symb ymax = 0.1343 * $coordFactor

c Determine lengths of the model
symb xlen = ( $xmax - $xmin )
symb ylen = ( $ymax - $ymin )

c *************************************************** 

c             Keypoints in the X-Direction

c *************************************************** 

symb #keycord x 1 $xmin $xlen 
symb #get { idx } rootmax x 

c *************************************************** 

c             Keypoints in the Y-Direction

c *************************************************** 

symb #keycord y 1 $ymin $ylen 
symb #get { jdx } rootmax y 

c ************************************************************************************************************* 

c             Indices Locations (IJK)

c ************************************************************************************************************* 

c Grid in I direction, using approximately element size of 'box' and at least 1 element
symb #keyindx i 1 $idx 1 $box 1 
symb indgrd = $i$idx

c Grid in J direction, using approximately element size of 'box' and at least 1 element
symb #keyindx j 1 $jdx 1 $box 1 
symb jndgrd = $j$jdx


c ************************************************************************************************************* 

c             GCON Grid & Geometry Allocation

c ************************************************************************************************************* 

grid $i$idx $j$jdx axiy 
geom
    keypnt $idx $jdx 
    end
 

c ************************************************************************************************************* 

c             Driving Conditions 

c ************************************************************************************************************* 

c             A number of predefined waveform functions can be accessed in OnScale. The DATA 
c            HIST option is used below, other examples include wavelets, gaussians and step 
c            functions. The manual details the function entries


c ************************************************************************************************************* 

symb freqtimefunc_1 = 1.0
data
    hist ud_timefunc_1 * 'D:/tem/time_force.dat' 
    end
 
func
    name timefunc_1 
    hist ud_timefunc_1 * 
    end
 
c -------------------------------------------------------------- 
c                   Project Material List
c -------------------------------------------------------------- 


c -------------------------------------------------------------------------
c Global variables used in all the material definitions
c -------------------------------------------------------------------------
c
symb epvacm = 8.854e-12               /* dielectric constant for vacumn
symb freqdamp = 1.e6 if noexist       /* specified frequency for damping model
symb rmu0 = 1.2566e-6

symb #msg 5
********************************************************
Damping matched at $freqdamp Hz
Redefine variable 'freqdamp' if device centre frequency
varies significantly from this value
********************************************************


c
c -------------------------------------------------------------------------
c    Now define the axis transformation - only posx used in this file
c -------------------------------------------------------------------------

axis
     form vctr
     defn posx car2 0. 0. 0.    1.  0.  0.   0. 1. 0.
     defn negx car2 0. 0. 0.   -1.  0.  0.   0. 1. 0.
     defn posy car2 0. 0. 0.    0.  1.  0.   0. 0. 1.
     defn negy car2 0. 0. 0.    0. -1.  0.   0. 0. 1.
     defn posz car2 0. 0. 0.    0.  0.  1.   1. 0. 0.
     defn negz car2 0. 0. 0.    0.  0. -1.   1. 0. 0.
     end

c -------------------------------------------------------------------------
c    Input material properties to program
c -------------------------------------------------------------------------

matr

c -------------------------------------------------------------- 
c type : METAL : 
c name : stst : 
c desc : Stainless Steel, generic : 
c -------------------------------------------------------------- 

    wvsp on 
    type elas 
    prop stst 7890.00 5790.00 3100.00 0.010000
    vdmp stst $freqdamp db 0.3 1.2 1e+06 1 0.01 1

c -------------------------------------------------------------- 
c type : PIEZO : 
c name : pzt5a : 
c desc : PZT5A Generic : 
c -------------------------------------------------------------- 

    symb rho  = 7750.00                    /* density
    wvsp off 
    type lean

c    define baseline stiffness coefficients (Constant electric field)

    symb c11 = 1.203e+11
    symb c12 = 7.52e+10
    symb c13 = 7.51e+10
    symb c14 = 0
    symb c15 = 0
    symb c16 = 0
    symb c22 = 1.203e+11
    symb c23 = 7.51e+10
    symb c24 = 0
    symb c25 = 0
    symb c26 = 0
    symb c33 = 1.109e+11
    symb c34 = 0
    symb c35 = 0
    symb c36 = 0
    symb c44 = 2.11e+10
    symb c45 = 0
    symb c46 = 0
    symb c55 = 2.11e+10
    symb c56 = 0
    symb c66 = 2.26e+10

    prop pzt5a $rho 
    $c11     $c12     $c13     $c14    $c15    $c16    $c22
    $c23     $c24     $c25     $c26    $c33    $c34    $c35
    $c36     $c44     $c45     $c46    $c55    $c56    $c66

c    define baseline dielectric coefficients

    symb epxx = 916
    symb epyy = 916
    symb epzz = 830

c    scale material properties as specified above
    symb aepxx = $epvacm * $epxx
    symb aepyy = $epvacm * $epyy
    symb aepzz = $epvacm * $epzz

    elec pzt5a $aepxx $aepyy $aepzz

c    define baseline piezoelectric coupling coefficients

    symb ex1 = 0            /* coupling constant
    symb ex2 = 0            /* coupling constant
    symb ex3 = 0            /* coupling constant
    symb ex4 = 0            /* coupling constant
    symb ex5 = 12.3            /* coupling constant
    symb ex6 = 0            /* coupling constant
    symb ey1 = 0            /* coupling constant
    symb ey2 = 0            /* coupling constant
    symb ey3 = 0            /* coupling constant
    symb ey4 = 12.3            /* coupling constant
    symb ey5 = 0            /* coupling constant
    symb ey6 = 0            /* coupling constant
    symb ez1 = -5.4            /* coupling constant
    symb ez2 = -5.4            /* coupling constant
    symb ez3 = 15.8            /* coupling constant
    symb ez4 = 0            /* coupling constant
    symb ez5 = 0            /* coupling constant
    symb ez6 = 0            /* coupling constant

    piez pzt5a 1 1 $ex1 1 2 $ex2 1 3 $ex3 1 4 $ex4 1 5 $ex5 1 6 $ex6 &
            2 1 $ey1 2 2 $ey2 2 3 $ey3 2 4 $ey4 2 5 $ey5 2 6 $ey6 &
            3 1 $ez1 3 2 $ez2 3 3 $ez3 3 4 $ez4 3 5 $ez5 3 6 $ez6

    rdmp pzt5a $freqdamp q 75 75 1e+06 * * *
    axis pzt5a posx   /* relate materials local system to global system


c -------------------------------------------------------------- 
c type : METAL : 
c name : brass : 
c desc : Brass : 
c -------------------------------------------------------------- 

    wvsp on 
    type elas 
    prop brass 8292.00 4321.00 2103.00 0.010000
    vdmp brass $freqdamp db 1.48 8.51 2.25e+06 1 0.01 1
    thrm brass 380 140 140 140 1.0 0 0 27
c    define baseline dielectric coefficients

    symb epxx = 4
    symb epyy = 4
    symb epzz = 4

c    scale material properties as specified above
    symb aepxx = $epvacm * $epxx
    symb aepyy = $epvacm * $epyy
    symb aepzz = $epvacm * $epzz

    elec brass $aepxx $aepyy $aepzz

    elec void $epvacm
    end

c ************************************************************************************************************* 

c             Primitive Definitions

c ************************************************************************************************************* 

site
    regn void 
    blok stst 0.0 0.25 0.0 0.1 0.0 0.0 
    multipoly pzt5a stnd * * * * * * 0.0 0.0 1 
    0.0 0.1 0.0 0.1025 0.00325 0.1025 0.00075 0.1 
    multipoly brass stnd * * * * * * 0.0 0.0 1 
    0.0 0.1025 0.0 0.1343 0.0095 0.1343 0.0095 0.1118 0.00325 0.1025 
    end
 

c ************************************************************************************************************* 

c             Boundary Definitions

c ************************************************************************************************************* 

boun
    side xmin free 
    side xmax free 
    side ymin symm 
    side ymax free 
    end
 

c ************************************************************************************************************* 

c             Calculated Properties 

c ************************************************************************************************************* 

c             By default, Flex only calculates the minimum required data set, typically this 
c            means only velocities. This is done for memory efficiency. Should other 
c            properites be required (e.g. displacements, stresses, strains, pressure), then 
c            these must be requested by the CALC command. The manual lists all these options


c ************************************************************************************************************* 

calc
    disp y          /* calculate displacements
    end
 

c ************************************************************************************************************* 

c             Piezoelectric Load Definitions

c ************************************************************************************************************* 

piez
    wndo auto piez 
    defn load_2 
    symb bxmin = 0.0 * $coordFactor - $box
    symb bymin = 0.1025 * $coordFactor - $box
    symb #get { is js * } clsnode $bxmin $bymin *
    symb bxmax = 0.00325 * $coordFactor + $box
    symb bymax = 0.1025 * $coordFactor + $box
    symb #get { ie je * } clsnode $bxmax $bymax *
    nod2 pzt5a brass $is $ie $js $je * * 
    bc load_2 off 

    defn load_3 
    symb bxmin = 0.0 * $coordFactor - $box
    symb bymin = 0.1 * $coordFactor - $box
    symb #get { is js * } clsnode $bxmin $bymin *
    symb bxmax = 0.00075 * $coordFactor + $box
    symb bymax = 0.1 * $coordFactor + $box
    symb #get { ie je * } clsnode $bxmax $bymax *
    nod2 pzt5a stst $is $ie $js $je * * 
    bc load_3 grnd 
    slvr drct 
    end
 


c ************************************************************************************************************* 

c             Force/Velocity Load Definitions

c ************************************************************************************************************* 

rigd
    defn load_1 
    symb bxmin = 0.0 * $coordFactor - $box
    symb bymin = 0.0 * $coordFactor - $box
    symb #get { is js * } clsnode $bxmin $bymin *
    symb bxmax = 0.0005 * $coordFactor + $box
    symb bymax = 0.0 * $coordFactor + $box
    symb #get { ie je * } clsnode $bxmax $bymax *
    node $is $ie $js $je * * stst 
    bc forc functimefunc_1 0.0 1.0 0.0 * * * 
    end
 

time * * 0.8 

c ************************************************************************************************************* 

c             Process Model 

c ************************************************************************************************************* 

c             Issue process (PRCS) command. Checks model integrity, and calculates stable 
c            time step. NOTE: Process command must always be issued


c ************************************************************************************************************* 

symb #msg 1
Checking Model Integrity......
prcs
grph
    colr user size 3 
    colr user 1 0.0 1.0 0.0 
    colr user 2 0.0 1.0 1.0 
    colr user 3 0.0 0.0 1.0 
    colr tabl matr 7 
    map stst 1 
    map pzt5a 2 
    map brass 3 
    end
 
grph
    line off 
    nvew 2 1 
    arrow pole 
    plot piez 
    plot matr piez 
    arrow off 
    end
 
term

c ************************************************************************************************************* 

c             Choose Time Histories To Store 

c ************************************************************************************************************* 

c             Save field (such as displacement or pressure) from a node or element for all 
c            time steps with POUT command. Histories are referenced by order of 
c            specification. Histories will be saved in the Flex History file (flxhst).


c ************************************************************************************************************* 

pout
    rate 1 
    symb xloc = 0.0 * $coordFactor
    symb yloc = 0.1 * $coordFactor
    hist xyz ydsp $xloc * * $yloc * * 
    symb xloc = 0.0 * $coordFactor
    symb yloc = 0.1 * $coordFactor
    hist xyz yvel $xloc * * $yloc * * 
    hist functimefunc_1 
    histname electrode vq all 
    end
 

c ************************************************************************************************************* 

c             Run the Model 

c ************************************************************************************************************* 

c             Specify the number of time steps to be run. Can be set to auto by using 
c            'Ringdown'.


c ************************************************************************************************************* 

c User defined runtime for the model
symb #get { step } timestep 
symb ttime = 7e-05
symb nexec = $ttime / $step
exec $nexec 

symb n_extra = nint ( $step / 10 )
exec $n_extra 
term

data
    file out 'conic.flxdato' 
    out modl 
    end
 

c ************************************************************************************************************* 

c             Save symbol variables to file for later use

c ************************************************************************************************************* 

symb #get { labl } jobname 
symb #save '$labl.symb' 
stop           /* return to command prompt

2 comments

  • Hi there,

    Can you please share your 'time_force.dat' file via your preferred file sharing service and I will take a look for you.

    Best Regards,

    Chloe

    Comment actions Permalink
  • Hi Yang Song,

    Your block is only being pushed upwards in the left bottom corner, is this correct?

    Also, how did you get the data for figure 1? What are the x and y axes on figure 1? 

    You may want to add in dynamic relaxation to allow problem to reach steady state quickly (using command drlx auto - see the command reference for more details). Also use our static solution (see static_option in exec command)

    All your boundary conditions are set to free, is this correct? Is no part of the model fixed in place?

    Best Regards,

    Chloe

    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post