Lattice Transition#

Design a lattice fill often means a combination of various styles and sizes across different parts of the component. The transition amongst these regional features could be a challenge task. Artisan is capable of automatically merging different lattice designs through the field based morphing algorithm.

Artisan treats the regional lattice designs as various fields, and the fields can be interpolated through certain mathematical ways, for example, a regional attractor or linearly interpolating between two lattices. Here we use a few simple examples to demonstrate the applications. User may find these examples under the folder \\Test_json\\FieldMerge\\.

Considering to fill a bar region with two different lattices, BC on one side gradually transits to the other side and merged with BCCubic lattice, see the JSON below.

{"Setup":{  "Type" : "Sample",
            "Sample": {"Domain" : [[0.0,100.0],[0.0,30.0],[0.0,30.0]], "Shape": "Box"},
            "Geomfile": "",
            "Rot" : [0.0,0.0,0.0],
            "res":[0.5,0.5,0.5],
            "Padding": 1,
            "onGPU": false,
            "memorylimit": 1073741824000
            },
 "WorkFlow":{
      "1": {"Add_Lattice":{
                "la_name": "BC", "size": [10.0,10.0,10.0], "thk":1.2, "Rot":[0.0, 0.0, 0.0], "Trans":[0.0, 0.0, 0.0],
                "Inv": false, "Fill": false, "Cube_Request": {}
                }
           },
      "2":{"OP_FieldMerge":{ "la_name":"BCCubic", "size":[10.0,10.0,10.0], "thk":1.2, "Rot":[0.0, 0.0, 0.0], "Trans":[0.0, 0.0, 0.0],
                             "OP_para":{
                                        "InterpType": "Linear",
                                        "pt_01":[10.0,0.0,0.0], "n_vec_01":[ 1.0,0.0,0.0],
                                        "pt_02":[90.0,0.0,0.0], "n_vec_02":[-1.0,0.0,0.0],
                                        "nJobs": 4.0,
                                        "ScratchPath" : ".//Test_results//Scratch//",
                                        "Transition": {}
                                        },
                             "Fill":true, "Cube_Request": {}
                                                       }
          },
      "3":{"Field_Boundary": {"Boundary": "Box"}},
      "4":{"Export": {"outfile": ".//Test_results/Box_FieldMerge_Lin.stl"}}
       },
 "PostProcess":{"CombineMeshes": true,
                "RemovePartitionMeshFile": false,
                "RemoveIsolatedParts": false,
                "ExportLazPts": false}
}

The item "2" keywords OP_FieldMerge in WorkFlow defines the field base lattice transition. It is similar to the keywords Lin_Interpolate which requires a definition of second field (an added on field), here the lattice field BCCubic. OP_para contains the parameters for calculating the transition of the geometric features.

pt_01, n_vec_01

Defines the plane that starts the transition from the main field. pt_01 is the point location, n_vec_01 is the normal vector.

pt_02, n_vec_02

Defines the plane that ends the transition at the second field. pt_02 is the point location, n_vec_02 is the normal vector.

nJobs, ScratchPath

nJobs defines the number of parallel threading used for computation. If it is 0 or negative number, it will use all available resources, if 1, normal serial computation. ScratchPath defines the working folder for exchange of data during parallel computation.

Transition

This parameter defines the influence lattice that used to guide the transition between two fields. If it is empty, no transition computation will be initiated.

The transition of two lattices should be looks like below. The vertical and horizontal beams were gradually growing until merged together.

_images/FieldMerge_01.png

Like many algorithm, the plain transition may not produce a “perfect” results. For instance, below shows a case that BC lattice transiting to the Cubic lattice.

_images/FieldMerge_02.png

The transition was mathematically right, but the resultant geometry had a large number of floating bits and the connectivity was broken at the middle part. In order to ensure the transition with good connectivity, Transition parameter is introduced. The JSON below shows the connected transition between BC and Cubic through a bridging lattice BCCubic.

{"Setup":{      "Type" : "Sample",
            "Sample": {"Domain" : [[0.0,100.0],[0.0,30.0],[0.0,30.0]], "Shape": "Box"},
            "Geomfile": "",
            "Rot" : [0.0,0.0,0.0],
            "res":[0.5,0.5,0.5],
            "Padding": 1,
            "onGPU": false,
            "memorylimit": 1073741824000
            },
 "WorkFlow":{
      "1": {"Add_Lattice":{
                "la_name": "BC", "size": [10.0,10.0,10.0], "thk":1.2, "Rot":[0.0, 0.0, 0.0], "Trans":[0.0, 0.0, 0.0],
                "Inv": false, "Fill": false, "Cube_Request": {}
                }
           },
      "2":{"OP_FieldMerge":{ "la_name":"Cubic", "size":[10.0,10.0,10.0], "thk":1.2, "Rot":[0.0, 0.0, 0.0], "Trans":[0.0, 0.0, 0.0],
                             "OP_para":{
                                        "InterpType": "Linear",
                                        "pt_01":[10.0,0.0,0.0], "n_vec_01":[ 1.0,0.0,0.0],
                                        "pt_02":[90.0,0.0,0.0], "n_vec_02":[-1.0,0.0,0.0],
                                        "nJobs": 4.0,
                                        "ScratchPath" : ".//Test_results//Scratch//",
                                        "Transition": {"la_name":"BCCubic", "size":[10.0,10.0,10.0], "thk":1.2, "Weight": 0.2, "f_trans":0.15}
                                        },
                             "Fill":true, "Cube_Request": {}
                                                       }
          },
      "3":{"Field_Boundary": {"Boundary": "Box"}},
      "4":{"Export": {"outfile": ".//Test_results/Box_FieldMerge_Lin.stl"}}
       },
 "PostProcess":{"CombineMeshes": true,
            "RemovePartitionMeshFile": false,
            "RemoveIsolatedParts": false,
            "ExportLazPts": false}
}

The parameter Transition contains the following parameter to setup the bridging lattice field.

la_name, size, thk

Defines the bridging lattice design.

Weight

Defines the influence factor of the third field on the transition calculation.

f_trans

Defines the transition rate of the bridging lattice towards the main lattice and the second lattice; if it is less than 0.5, the transition from main lattice will be faster to the middle status, whereas the value greater than 0.5 indicates the slower transition rate from main lattices.

_images/FieldMerge_03.png

The BC lattice transformed to Cubic field through bridging lattice BCCubic. User may try different Weight and f_trans to check how the factors affect the results.

In addition to Linear transition, OP_FieldMerge supports Attractor transition which is similar to the keywords Add_Attractor. The JSON below demonstrates the merging of Cubic lattice with regionally varying size.

{"Setup":{  "Type" : "Sample",
            "Sample": {"Domain" : [[0.0,100.0],[0.0,100.0],[0.0,100.0]], "Shape": "Box"},
            "Geomfile": "",
            "Rot" : [0.0,0.0,0.0],
            "res":[0.5,0.5,0.5],
            "Padding": 1,
            "onGPU": false,
            "memorylimit": 1073741824000
            },
 "WorkFlow":{
      "1": {"Add_Lattice":{
                "la_name": "Cubic", "size": [10.0,10.0,10.0], "thk":1.2, "Inv": false, "Fill": false,
                "Cube_Request": {}
                }
           },
      "2":{"OP_FieldMerge":{ "la_name":"Cubic", "size":[5.0,5.0,5.0], "thk":1.2,
                             "OP_para":{
                                        "InterpType": "Attractor",
                                        "pt_att": [100.0,100.0,100.0],
                                        "pt_r": 125.0,
                                        "nJobs": 6.0,
                                        "ScratchPath": ".//Test_results//Scratch//",
                                        "Transition": {}
                                       },
                             "Fill":true, "Cube_Request": {}
                                                       }
          },
      "3":{"Field_Boundary": {"Boundary": "Box"}},
      "4":{"Export": {"outfile": ".//Test_results/Box_FieldMerge_VarSize.stl"}}
       },
 "PostProcess":{"CombineMeshes": true,
            "RemovePartitionMeshFile": false,
            "RemoveIsolatedParts": false,
            "ExportLazPts": false}
}

The parameter pt_att defines the coordinate of the attractor, and pt_r defines the radius of the ball which covers the whole transition. The results are shown below.

_images/FieldMerge_06.png _images/FieldMerge_07.png

This certainly can be applied to the lattice transition, as shown below. User may find the complete JSON in the file Box_FieldMerge_Attractor.txt.

_images/FieldMerge_08.png _images/FieldMerge_09.png

The transition supports all lattice definitions in all circumstances. In other words, the lattices can be transformed to any given shape that forms a local lattice field. It would be good that two lattices share a similar geometric or topological similarity. The example below shows the transition of conformed BC lattice to the conformed box-frame object lattice in a twisted bar geometry. Two lattices have similar shape features, however, with many different details.

{"Setup":{      "Type" : "Geometry",
            "Geomfile": ".//sample-obj//Twisted_Bar//Twisted_Bar.stl",
            "Rot" : [0.0,0.0,0.0],
            "res":[3.0,3.0,3.0],
            "Padding": 3,
            "onGPU": false,
            "memorylimit": 16106127360
            },
"WorkFlow":{
      "1": {"Add_Lattice":{
                "la_name": ".//Test_json//LatticeMerge//Twisted_Bar_Conformal_La01.mld",
                "size": [200.0,200.0,200.0], "thk":5.0, "Inv": false, "Fill": false,
                "Cube_Request": {}
                }
           },
              "2":{"OP_FieldMerge":{ "la_name":".//Test_json//LatticeMerge//Twisted_Bar_Conformal_La02.mld",
                             "size":[200.0,200.0,200.0], "thk":15.0,
                             "OP_para":{
                                        "InterpType": "Linear",
                                        "pt_01":[300.0,0.0,0.0], "n_vec_01":[ 1.0,0.0,0.0],
                                        "pt_02":[900.0,0.0,0.0], "n_vec_02":[-1.0,0.0,0.0],
                                        "nJobs": 4.0,
                                        "ScratchPath" : ".//Test_results//Scratch//",
                                        "Transition": {}
                                        },
                             "Fill":false, "Cube_Request": {}
                                                       }
          },

      "3":{"Export": {"outfile": ".//Test_results/Twisted_Bar_ConformalCustomLattice.stl"}}
       },
"PostProcess":{"CombineMeshes": true,
            "RemovePartitionMeshFile": false,
            "RemoveIsolatedParts": false,
            "ExportLazPts": false}
}

The conformal lattice definition in Twisted_Bar_Conformal_La01.mld:

{
 "type": "ConformalLattice",
 "definition": {
       "meshfile": ".//sample-obj//Twisted_Bar//Twisted_Bar.med",
       "la_name" : ".//Test_json//LatticeMerge//CustomLattice_Geom.txt"
        }
}

and CustomLattice_Geom.txt defines

{
 "type": "Geom",
 "definition": {
       "file": ".//sample-obj//boxframe.obj",
       "ladomain": "Hex"}
}

The second lattice definition in Twisted_Bar_Conformal_La02.mld setup the Cubic lattice.

{
 "type": "ConformalLattice",
 "definition": {
        "meshfile": ".//sample-obj//Twisted_Bar//Twisted_Bar.med",
        "la_name" : "Cubic"
        }
}

The results below shows a good smooth transition from a customer defined geometric lattice to a beam-like Cubic lattice.

_images/FieldMerge_04.png _images/FieldMerge_05.png

Here are a few hits and keypoints of using OP_FieldMerge algorithm:

  1. The best pairing of two merged lattices shall have a topological similarity. This ensures a smooth and continuously connected transition.

  2. The bridging lattice has to be considered to assist the lattices which have no close topological or geometric similarity.

  3. User may requires standard shape cases studies, e.g. on the box or bar shape, to check the lattice transition before applying to actual design.

  4. The computation of the merging algorithm is heavy, and requires longer time to finish the task. User shall expect a long computation time on the complex design.

  5. Increasing the resolution, or the transition region, may improve the continuous connectivity of the lattice, however, this could yield a longer computation time.