本帖最后由 晚睡早起 于 2010-10-29 11:27 编辑
其它网站看到这个问题的回复,转帖过来大家分享
- FUNCTION ResultsExtraction()
- INTEGER nlayers, result_ids(VIRTUAL), layer_ids(VIRTUAL)
- STRING lctitle[80], subtitle[31], primary_label[80], secondary_label[80], layer_labels[80](VIRTUAL)
- STRING elem_list[12], derivation[5], location[10], cid[2]
- INTEGER datatype, resloc, nres, return_value
- INTEGER ids(VIRTUAL), nresults(VIRTUAL), minloc(12), maxloc(12)
- REAL results(VIRTUAL)
-
- sys_allocate_array (result_ids, 1, 4)
- lctitle = "Default" /* 输入load case名称 */
- subtitle = "A1:Static Subcase" /* 输入subcase名称 */
- primary_label = "Stress Tensor" /* 输入primary result名称 */
- secondary_label = "" /* 输入secondary result名称
-
- elem_list = "Elem 1:5" /* 输入单元列表名称 */
- derivation = "VONM" /* 输入结果类型为von Mises */
- location = "C" /* 输入所要提取的结果位置为Centroid, 若要提取节点(Nodal)的结果, 则输入“N” */
- cid = "" /* 输入结果的参考坐标系名称, 若留空则代表为默认坐标系(As is) */
-
- db_get_load_case_id (lctitle, result_ids(1)) /* 获取load case ID */
- db_get_sub_case_id (result_ids(1), subtitle, result_ids(2)) /* 获取subcase ID */
- db_get_primary_res_id (primary_label, result_ids(3)) /* 获取primary result ID */
- db_get_secondary_res_id (result_ids(3), secondary_label, result_ids(4)) /* 获取secondary result ID */
- res_utl_get_result_layers (result_ids, nlayers, layer_ids, layer_labels) /* 获取 layer position ID */
-
- sys_reallocate_array (result_ids, 1, 5)
- result_ids(5) = layer_ids(1)
- return_value = res_utl_extract_elem_results( result_ids, elem_list, derivation, location, cid, @
- datatype, resloc, nres, ids, nresults, results, minloc, maxloc )
-
- dump results /* 输出结果 */
-
- END FUNCTION
复制代码
|