Cube  Inverse Calculation¶
The inverse calculation searches the geometric designs that closely matches user preferred mechanical property over the defined domain. For instance, user would like to have a lattice structure has overall elastic modulus of 79GP with Ti64 material, the Cube API can calculate the closest solution in a few seconds for the user selected lattice and defined size domain.
Conditions¶
Cube calculates the requested quantity through the stressstrain curve under condition of the sample block compressed by 2mm. In some cases, the plastic deformation may not be reached. The requested input and output are in SI unit.
Force 
Displacement 
Time 
Stress 

Newton, N 
Meter, m 
Seconds, s 
Pascal, Pa 
Arguments¶
Argument 
Type 
Description 


string, single element list 
User token for verification purpose. 

string, single element list 
Name of lattice requested 

string, single element list 
Crosssectional profile of the beam. Two options are avaiable, “C” for the circule shape and “R” for Square shape. 

string, single element list 
Defines the base material of lattice structure. For Cube product, three materials are avaiable, Ti64, Inconl. 

string, single element list 
requested operations. 

float number, single element list 
The requested Young’s modulus. The parameter is requried for the inverse calculation on the geometric factors (e.g. x, y, z and Thk). 

float number, single element list 
Upper bounds of the beam profile 

float number, single element list 
Lower bounds of the beam profile 

float number, single element list 
Upper bounds of cell width in x direction 

float number, single element list 
Lower bounds of cell width in x direction 

float number, single element list 
Upper bounds of cell width in x direction 

float number, single element list 
Lower bounds of cell width in x direction 

float number, single element list 
Upper bounds of cell width in x direction 

float number, single element list 
Lower bounds of cell width in x direction 
The table below shows the possible selections of the parameter values.
Parameters 
Values 









The key cmd
controls the a series of requested operation as explained below.

Description 


Calculating the geometric factor, i.e. 

search the defined geometric domain to find the closest match to the given Young’s modulus. 

search the defined geometric domain to find the minimum Young’s modulus. 

search the defined geometric domain to find the maximum Young’s modulus. 
Returns¶
Returned fields are corresponding to the operation key cmd
, explained below. A general field Msg
in all returned results contains error or successful information.

Returned fields 
Type 
Description 



float, single element list 



float, single element list 



float, single element list 



float, single element list 

Examples¶
Example 1: Search the global solution of geometric design of FUCubic lattice that produces the overall elastic modulus 2.0E+8Pa
The python example code is below
import requests, json
# Endpoint url
cube_url = "http://cube.bleemcube.com/"
# User token
Token = "f3aa3c1128174a73993cdb9a62a0ada7"
# Body data section includes all information and data for calculation.
data = {
"Lattice": ["FCCubic"],
"Profile": ["C"],
"Material": ["Ti64"],
"cmd" : ["invE"],
"Thk": ["0.0005123"],
"TargetE": ["2.0E+08"]
}
# connects to API
header = {"xapikey":Token}
r = requests.post(cube_url, data = json.dumps(data), headers=header)
# convert returned bytes data to string
responses = (r.content.decode("utf8")).replace("\'","\"")
# then convert string to dict
re = json.loads(responses)
print(re)
User should see the results as below.
{'Msg': 'OK', 'Thk': 0.0001305059783383738, 'x': 0.0075229189404850865, 'y': 0.008403907280997705, 'z': 0.006264339776133071, 'E_diff': 0.0018271803855895996}
Example 2: based on example 1, search the elastic modulus over the defined geometric domain
Update data
in above codes as the one below
data = {
"Lattice": ["FCCubic"],
"Profile": ["R"],
"Material": ["Inconel_718"],
"cmd" : ["invE_BC"],
"Thk": ["0.0003"],
"TargetE" : ["2.21345E+08"],
"Thk_lb":[0.00001],
"Thk_ub":[0.000043],
"x_lb": [0.004],
"x_ub": [0.005],
"y_lb": [0.004],
"y_ub": [0.005],
"z_lb": [0.004],
"z_ub": [0.005],
}
User shall expect the results like:
{'Msg': 'OK', 'Thk': 3.55561791228093e05, 'x': 0.00170937702863693, 'y': 0.0034239391103587083, 'z': 0.005668920196695159, 'E_diff': 0.000571131706237793}