How to set BC on free edge on specific plane using .tcl?

Oskar Neumann
Oskar Neumann Altair Community Member
edited October 2020 in Community Q&A

Hello, I would like to set boundary conditions and a torsional moment on free edges of a specimen using a .tcl script. Creating the BC's manually and checking the command.tcl document does not give the desired result. For example, the command.tcl document uses

 

*createmark nodes 1 1-7
*loadcreateonentity_curve nodes 1 3 1 0 0 -999999 -999999 -999999 -999999 0 0 0 0 0

 

to create a BC at the lower free edge of the specimen. 

The geometry of the specimen should be slightly modified to compare different variations. Because of these changes I am looking for a similar method to create BC's not on a list of nodes but on a free edge on a certain plane (e.g. on all nodes on the x-z plane with y=0).

 

Thank you very much for any advice.

Tagged:

Answers

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited August 2020

    you need to use the other *createmark options for this.

    Take a look at tehe documentation for *createmark, and you'lll find more info.

    Try the ''on plane' option. and take a look at this topic.

     

  • Oskar Neumann
    Oskar Neumann Altair Community Member
    edited August 2020

    Hello again Adriano, thank you for the quick reply. For my understanding using *createmark on plane like

     

    *createmark plane 1 0 0 0 0 1 1 0.5 1 1

     

    should create a mark (mark-ID = 1) containing all nodes within a tolerance of 0.5 of the plane defined by the vector (0, 1, 1) which equals the y-z-plane. This command does go trough, yet trying to create a BC for the with mark-ID 1 selected nodes does produces the error

     

    *loadcreateonentity_curve node 1 3 1 0 0 0 -99999999 -99999999 -9999999999 -9999999999 -99999999 0 0 0 0 0

    'Nodes habe not been selected.'

     

    What am I missing here? Thank's again for your helpful remarks.

     

    Here the corresponding documentation snippet:

    'on plane' x y z i j k tol plane touching
    Place entities on mark_id if they are within tol of the plane or vector defined by (x, y, z, i, j, k).
    x - base x coordinate
    y - base y coordinate
    z - base z coordinate
    i - normal x component
    j - normal y component
    k - normal z component
    tol - tolerance to use to search for entities
    If plane is 0, all entities must be within tol of the vector defined by (x, y, z, i, j, k). Otherwise, all entities must be within tol of the plane defined by (x, y, z, i, j, k).
    If touching is 0, all points of the entity must touch the vector or plane. Otherwise, at least one point must touch the vector or plane. For solids, if touching is 0, no solids will be found.
     
     
  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited August 2020

    YZ plane is defined by its normal vector (x axis).

    So it should be ( 1 0 0 ) instead of 0 1 1

  • Oskar Neumann
    Oskar Neumann Altair Community Member
    edited August 2020

    Using 

     

    *createmark plane 1 0 0 0 1 0 0 0.5 1 1 instead of *createmark plane 1 0 0 0 0 1 1 0.5 1 1 still does not select the desired nodes.

     

    Here the script to recreate the situation.

     

    *deletemodel [hm_answernext yes]

    *geomimport 'step_ct' 'PATH/TO/kerbe_export_m.stp'

    *setedgedensitylinkwithaspectratio 0
    *createmark surfs 1 'all'
    set surfs_list [hm_getmark surfs 1]

    *interactiveremeshsurf 1 2.5 1 1 1 1 2 90
    *set_meshfaceparams 0 5 1 0 0 0 0.5 1 1
    *automesh 0 2 1
    *storemeshtodatabase 1
    *ameshclearsurface
    *createmark elements 1 'displayed'
    *refine_by_patterns 1 28 'refine_zone_size = 0.625 auto_transition = 0
    transition_zone_length = 17.5 transition_zone_width = 14 transition_zone_height = 15
    refine_zone_length = 6.5 refine_zone_width = 6.5 refine_zone_height = 7 system_id = 0
    squeez = 1'

    *createmark plane 1 0 0 0 1 0 0 0.5 1 1
    *loadcreateonentity_curve node 1 3 1 0 0 0 -99999999 -99999999 -9999999999 -9999999999 -99999999 0 0 0 0 0

     

     

    Thank you for any advice.

     

  • Oskar Neumann
    Oskar Neumann Altair Community Member
    edited August 2020

    Got confused with .tcl. This now works:

     

    *createmark nodes 1 'on plane' 1 0 1 0 1 0 0.5 1 1

    *loadcreateonentity_curve node 1 3 1 0 0 0 -99999999 -99999999 -9999999999 -9999999999 -99999999 0 0 0 0 0

     

    Thank you Adriano!