Assigning correct properties to Grain model 回答済み

I am simulating ultrasound through grain data. Each grain is assigned a rotation by means of Euler Angles. I have a few questions as I am not confident my model is doing what I want it to do. 

1) Each of my grains are defined via a material axis using Cartesian coordinates. Each grain has a set of 6 coordinates, like 2 sets of Euler Angles. I think there should be 1 set per 'material'm so I am not sure what the 6 columns represent . This will impact wither each of my grains are actually being assigned the correct rotations to them. Below is an example of what each grain is like. This is a text file I am reading into my model.

I thought it was  x y z , i j k.  In this instance it is not.

2) I am wondering if the code in my model is assigning the rotations to each feature correctly. I am not sure if anything is being overwritten  and not 100% confident that my do loop (axis) function is correct. Below is a snippet of my model.  I am more than happy to share my files if this is something that anyone can help with.

Thanks

Dave :)

c Materials
symb #get { nmat } tablmatr $tfname
axis
symb #read Rotations_50um.txt
form angl
defn matAx1 cart 0. 0. 0. 0. 0. 0.
end
matr
type elas
wvsp on
prop watr 1000. 1000. 0.
c prop steel 7900. 5900. 3200.
c ***********************************************************************************************************
c Anisotropic Steel Crystals
c ***********************************************************************************************************
c Crystal Stiffness properties
symb c11 = 162000000000
symb c44 = 47000000000
symb c12 = 92000000000
symb c13 = 69000000000
symb c33 = 181000000000
symb c66 = 35000000000
symb rho = 4430
c ***********************************************************************************************************
c Matr 1
c ***********************************************************************************************************
type lean
wvsp off
prop titm $rho
$c11 $c12 $c13 0.0 0.0 0.0 $c11
$c12 0.0 0.0 0.0 $c11 0.0 0.0
0.0 $c44 0.0 0.0 $c44 0.0 $c66

do loopI I 1 $nmat 1
copy titm matr$I
axis matr$I matAx$I
end$ loopI

end


7件のコメント

  • Hi David,

    1) I'm not sure I understand but there are several approaches to define a local coordinate system in OnScale Lab. There are three forms, vctr and angl and cord and each form has associated axistypes. It appears that you might be using a vctr or cord form with the cart axistype. Depending on the form of your Euler angle input data, the angl form might be more convenient as this operates with Euler angles. Please refer to the command documentation on the axis command.

    You can check what these axis assignments are doing to your material properties by using the

    matr 
    prnt stif matname

    command to get the resulting stiffness matrix. The tensor components will change depending on the angle and offer a way to check your model.

    2) Your code looks fine. I recommend that you confirm the angles with by evaluating resulting stiffness tensors. Please pay special attention to how the axis orientations are defined in your Rotations_50um.txt file. Usually this is where issues can occur.

    コメントアクション Permalink
  • Hi

    How do we evaluate stiffness tensors to confirm angles?

    When I input my rotations file into OnScale. Does it matter if I keep my file in radians or change it to degrees? Is OnScale compatible with both of these?

    Thanks

    Dave :)

    コメントアクション Permalink
  • Hi Dave,

    Please use degrees instead of radians for entering angles for the axis command. OnScale uses mixed conventions but generally entry to commands uses degrees whereas mathematical operations use radians.

    With regards to evaluating whether the direction has been applied or not, you could look at the generated .flxprt file which will have information on any local axes assigned to a material. Directly confirming orientation change from the tensor is more challenging. Depending on the anisotropy in the material, you could look at the direction with maximum wavespeed. A change in orientation of the stiffness will have a similar change in the direction of maximum wavespeed for example.

    Thank,

    Tapiwa

    コメントアクション Permalink
  • Hi Tapiwa

    Thanks for your input, it is  greatly appreciated and you have given me some things to think about and I am wondering if you could clear a couple of things up.

    1) The rotations file that I am reading in is the transformation coordinates of rotated vectors. So would this make the command  '' form angl ''  line in my code redundant ? Instead use form vctr

    But if I use anything other than form angl I get an error saying

     bad axis definition  -- matAx1 


    2) I am also concerned that my code is overwriting some of my data.  In the line 

    defn matAx1 cart 0. 0. 0. 0. 0. 0.


    This line is defining the axis name calling it matAx1, but if you notice from the rotations file I am reading in, the first material has the name matAx1. So wen I run through the loop I am not confident I am changing to new values for every material and not overwriting anything. The way this axis is set up with matAx1 is confusing me.

    3) If I wanted to change the orientation of all the grains in my model to all have the same orientation, say 45 degrees. Is this something OnScale can do ?

    Thanks

    Dave :)

    コメントアクション Permalink
  • Hi David,

    Thanks for following up. Please note that the "angl" form is a convenient way of performing rotations using euler notation. It does the exact same thing as the other forms. It is advantageous when the data you are reading already exists as Euler angles. With regards to your questions, my thoughts are below:

    1. I notice that you import definitions from the rotations file before you use the "form angl" command. This means that the command only applies to coordinate rotations that occur after the "form angl" command. The default form "form vctr" is applied to the imported rotations by default.

    You will not be able to use the angl form on these anyway because of the way they are constructed. vctr uses 9 values composed of 3 vectors in defining the local coordinate sytem.  angl on the other hand uses 6 values, one vector for the origin and 3 angles for the orientations. This is why you have an error. Your command

    defn matAx1 cart 0. 0. 0. 0. 0. 0.

    is not compatible with the vctr form.

    2. Yes, it appears that you might be over writing the local coordinate system matAx1. The whole instruction group

    form angl
    defn matAx1 cart 0. 0. 0. 0. 0. 0.
    end

    is redundant and can be taken out. It should not have an impact on axes matAx2 - - - matAxn

    3. This is possible. Please consider this script

    c Materials
    symb #get { nmat } tablmatr $tfname
    axis
    symb #read Rotations_50um.txt
    form angl
    defn matAxk cart 0. 0. 0. 45. 0. 0.
    end
    matr
    type elas
    wvsp on
    prop watr 1000. 1000. 0.
    c prop steel 7900. 5900. 3200.
    c ***********************************************************************************************************
    c Anisotropic Steel Crystals
    c ***********************************************************************************************************
    c Crystal Stiffness properties
    symb c11 = 162000000000
    symb c44 = 47000000000
    symb c12 = 92000000000
    symb c13 = 69000000000
    symb c33 = 181000000000
    symb c66 = 35000000000
    symb rho = 4430
    c ***********************************************************************************************************
    c Matr 1
    c ***********************************************************************************************************
    type lean
    wvsp off
    prop titm $rho
    $c11 $c12 $c13 0.0 0.0 0.0 $c11
    $c12 0.0 0.0 0.0 $c11 0.0 0.0
    0.0 $c44 0.0 0.0 $c44 0.0 $c66

    do loopI I 1 $nmat 1
    copy titm matr$I
    axis matr$I matAxk
    end$ loopI

    end

    This creates a new local axis "matAxk" with 45 degree orientation and applies this axis to all the grains.

    コメントアクション Permalink
  • Hi Tapiwa

    Thank you so much. This feedback is really helpful.

    Regarding the 45 degree orientation

    defn matAxk cart 0. 0. 0. 45. 0. 0.


    I am just trying to visualise how this is applied. It is the positioning of this 45 that is confusing me.

    What if I changed this to this below  instead?

    defn matAxk cart 0. 0. 0. 0. 45. 0.


    x - y - z - i - j - k ( is the format of this Cartesian system?) 

    Thanks

    Dave :) 

    コメントアクション Permalink
  • Dave,

    The 45 degrees is 45 degrees about the x axis. If you change the form to the second form, that would be 45 degrees about the y axis. The last position will give 45 degrees about the z axis. There is direct correspondence with Euler angles for this definition.

    The format you have presented of how the coordinate system is described is incorrect. There is no "x-y-z-i-j-k". What we have are a position vector for the origin, and 3 angles about each of the axes of the coordinate system.

    I urge you to have a look at the command reference for more information on this. You can access this from the desktop client with the navigation process shown below

    This will open a document in your browser

     

     

    Which you can navigate to the appropriate command.

     

    Please let me know if I can offer more insights.

    Tapiwa

    コメントアクション Permalink

サインインしてコメントを残してください。

お探しのものを見つけられませんでしたか?

新規投稿