Help with analyst script 回答済み

Hi everyone

I am wondering if someone can help me with my analyst script. I have a square EBSD titanium sample with a water buffer surrounding all 4 edges. I am trying to remove the top and bottom water buffer, but I can only manage to remove the top part. I have played around for a good few hours now and I can't seem to fix it.

 

 

As you can see I have removed the top water buffer part and I have  tried assigning nodes etc. Its probably really simple and only one or 2 lines that need changed but I am not sure if something is defined wrong and I am unable to see it. If anyone can help, it would be greatly appreciated.

The link to my files can be found below

 

https://strath-my.sharepoint.com/:f:/r/personal/david_harra_strath_ac_uk/Documents/ONSCALE?csf=1&web=1&e=EOVUIc 

 

I have tried altering the key points in the y-direction in Lines 48 and also playing around with Lines 111 and 112 where I am assigning the water and reading in the EBSD geometry.

Thanks

Dave :) 

4件のコメント

  • Hey David,

    We can't access the files because we aren't on the strath sharepoint.

    But looking at the model you shouldn't have to mess around with the keypoints.

    Going of the image you shared if the first y keypoint is at the bottom of the water block and the second y keypoint is at the bottom of the titanium block then if you add this line to the site command it should remove the water

    regn void $i1 $indgrd $j1 $j2

    Note: $indgrd is the last keypoint on the x-axis

     

     

     

    コメントアクション Permalink
  • Add the regn command to the bottom of the site command. If you don't then it will be overwritten by the water definition.

    Oliver

    コメントアクション Permalink
  • Hi Oliver, thanks for the reply.

    I have tried using the (regn void) like you suggested but I am either removing all the water or the wrong parts. I may have some parts defined wrong, I am not the best at coding and this definitely is a learning curve.

    Is there a way you could access my files?

    I will copy relevant parts of my code just in case its an easy fix and you can spot it.


    c ***********************************************************************************************************
    c X-Y-Z CO-ORDINATE SYSTEM
    c ***********************************************************************************************************
    c Read dimensions from table file
    symb #get { xmin xmax ymin ymax } tablsiz $tfname
    c Place origin at left of model
    symb xlen = $xmax - $xmin
    symb ylen = $ymax - $ymin
    symb buffer = $xmin

    c Define keypoints in x
    symb #keycord x 1 0. $buffer $xlen $buffer
    symb #get { idx } rootmax x
    c Define keypoints in y
    symb #keycord y 1 0. $ylen
    symb #get { jdx } rootmax y
    c Get Origins
    symb xorg = $x1
    symb yorg = $y1

    c ***********************************************************************************************************
    c I-J-K CO-ORDINATE SYSTEM
    c ***********************************************************************************************************
    symb #keyindx i 1 $idx 1 $box
    c Alternate way of creating j keypoints
    symb #keyindx j 1 $jdx 1 $box
    c ***********************************************************************************************************
    c GRID & GEOMERTY DEFINITION
    c ***********************************************************************************************************
    c Create grid, with axisymmetric contraints
    grid $i$idx $j$jdx
    c Assign geometry, shortened version
    geom keypnt $idx $jdx

    c ***********************************************************************************************************
    c Material site definitiom
    c ***********************************************************************************************************
    c Create local axis for positioning cad data
    axis
    form angl
    defn tablax cart $xorg $yorg 0. 0.
    end
    c Assign materials to grid
    site
    regn watr
    regn void $i2 $i3
    tabl in $tfname tablax
    end


    Thanks

    Dave :)

     

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

    add the following lines before the site command:

    symb #get { ib jb } clsnode 0.0 $ymin 
    symb #get { ie je } clsnode 0.0 $ymax

    This returns the ijk-indices of the grid node closest to the spatial location (x,y,z) in integer variables. The nodal location at the start and end of the sample will be saved to the variables jb and je. You can rename these if you like.

    Then make these changes to the site command:

    site 
         regn watr
    regn void $i2 $i3 $j1 $jb /* Remove water at bottom
      regn void $i2 $i3 $je $j$jdx /* Remove water at top
    tabl in $tfname tablax

    This should work... If not can you send the files to support@onscale.com and I'll take a look.

    Best regards,

    Oliver

    コメントアクション Permalink

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

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

新規投稿