what is wrong with my material code? Answered

hey,

I want to define several pzt materials by matr command.My defined pzt materials have same property but different material name.I used ‘do loopI’ to define different material name ,like the following material code.But when I assigned the pzt materials with different material name to different area of my model,the debug window says unknown material. Is it wrong to name the material in this way?And how to define the material with same property but different name?

By the way ,I have defined  the variable ‘ narelem’.

Best regards

  1. the material code
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 : PIEZO :
c name : pzt:
c desc : pzt Generic :
c --------------------------------------------------------------

c define baseline dielectric coefficients


symb epxx = 916 /* dielectric constant (constant strain)
symb epyy = 916 /* dielectric constant (constant strain)
symb epzz = 830 /* dielectric constant (constant strain)
symb rho = 7750 /* density
symb qdmp = 75 /* Mechanical Q at 1e6
symb qsdmp = 75 /* Mechanical Q at 1e6
symb freqdamp = 1.e6 if noexist
symb freqloss = 1e+06 if noexist /* Frequency that loss was measured at

c define baseline stiffness coefficients

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

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

c scale material properties as specified above

symb aepxx = $epvacm * $epxx
symb aepyy = $epvacm * $epyy
symb aepzz = $epvacm * $epzz

wvsp off
type lean

do loopI I $narelem 1
prop pzt_ext$I $rho
$c11 $c12 $c13 $c14 $c15 $c16 $c22
$c23 $c24 $c25 $c26 $c33 $c34 $c35
$c36 $c44 $c45 $c46 $c55 $c56 $c66

elec pzt_ext$I $aepxx $aepyy $aepzz

piez pzt_ext$I 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 pzt_ext$I $freqdamp q $qdmp $qsdmp $freqloss 1.0

axis pzt_ext$I posx /* relate materials local system to global system
end$ loopI
end

2. site material to the model

 do loopI I 1 $narelem 1
symb jend = 2 * $I + 1
symb jbeg = $jend - 1
regn pzt_ext$I $i1 $i2 $j$jbeg $j$jend
end$ loopI

2 comments

  • Could anyone help me please ?

    Comment actions Permalink
  • Hi Hxd,

    It looks like you are just copying the materials what you should do is define one instance of the piezoelectric material then copy out that material.

    do loop I 1 $narelem 1 
    copy pzt_ext pzt_ext$I
    end$ loop
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post