版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
HyperMesh的求解器接口和模板HyperMesh的求解器接口和模板概覽關(guān)鍵點(diǎn):求解器的卡片查找求解器有關(guān)的屬性練習(xí):從卡片中自動(dòng)獲取數(shù)據(jù)給求解器有關(guān)的屬性賦值創(chuàng)建一個(gè)可以反復(fù)使用的用于創(chuàng)建材料的函數(shù)練習(xí):創(chuàng)建一個(gè)材料并定義材料更新求解器有關(guān)的屬性例子:自動(dòng)定義和更新一組材料求解器的卡片OptiStructMAT1類(lèi)型材料的卡片示例:上圖中每一個(gè)輸入項(xiàng)都對(duì)應(yīng)了optistruct模型中的一個(gè)屬性和數(shù)據(jù)名,這個(gè)模型在:
<altair_home>/templates/feoutput/common_nas_os/attribs
其中的一部分定義如下:*defineattribute(E,1,real,none)*defineattribute(G,2,real,none)*defineattribute(Nu,3,real,none)*defineattribute(Rho,4,real,none)查找求解器有關(guān)的屬性求解器有關(guān)的屬性可以用
hm_getentityvalue,hm_attributearrayvalue
和
hm_attributearray2dvalue
命令來(lái)查找Thesecommandsuseadata_name_stringtoaccessaparticularpieceofdata.
每一個(gè)屬性都有一個(gè)名稱(chēng)和ID號(hào)。例如,我們之前將的MAT1類(lèi)型的材料的幾個(gè)常用的屬性:*defineattribute(E,1,real,none)*defineattribute(G,2,real,none)*defineattribute(Nu,3,real,none)*defineattribute(Rho,4,real,none)得到一個(gè)ID號(hào)為11的材料的彈性模型E的值:hm_getentityvaluemats11"\$E"0
練習(xí):從卡片中自動(dòng)獲取數(shù)據(jù)在OptirStruct模板中獲取ID號(hào)為1的MAT1類(lèi)型的材料的Young’sModulus(E),ShearModulus(G),Poisson’sratio(Nu),和density(Rho)顯示獲得的這些值用到的命令:hm_getentityvaluesetreturn\proctk_messageBox給求解器有關(guān)的屬性賦值當(dāng)我們創(chuàng)建一個(gè)新的名稱(chēng)為steelMAT1類(lèi)型的材料時(shí),command.cmf文件記錄下的HyperMesh的命令:*collectorcreate(materials,"steel","",11)*createmark(materials,2)"steel"*dictionaryload(materials,2,"C:/Altair/hw10.0/templates/feoutput/optistruct/optistruct","MAT1")*attributeupdateint(materials,1,3240,1,2,0,1)*attributeupdatedouble(materials,1,1,1,1,0,210000)*attributeupdatedouble(materials,1,2,1,0,0,0)*attributeupdatedouble(materials,1,3,1,1,0,0.3)*attributeupdatedouble(materials,1,4,1,1,0,7.85e-009)*attributeupdatedouble(materials,1,5,1,0,0,0)*attributeupdatedouble(materials,1,6,1,0,0,0)*attributeupdatedouble(materials,1,7,1,0,0,0)*attributeupdatedouble(materials,1,341,1,0,0,0)*attributeupdatedouble(materials,1,343,1,0,0,0)*attributeupdatedouble(materials,1,345,1,0,0,0)*attributeupdateint(materials,1,5237,1,2,0,0)
給求解器有關(guān)的屬性賦值我們看其中的一條命令:*attributeupdatedouble(materials,1,1,1,1,0,210000)這里:materials
擁有這個(gè)屬性的實(shí)體類(lèi)型1istheIDoftheentity1istheIDoftheattribute1isthesolvernumberoftheattribute1isthestatusoftheattribute0isthebehavioroftheattribute210000isthevalueoftheattribute
我們?cè)偃タ?/p>
optistruct
attribs
模板,就會(huì)發(fā)現(xiàn)這里ID號(hào)為1的屬性代表的是彈性模型E或者叫Young’sModulus創(chuàng)建一個(gè)可以反復(fù)使用的用于創(chuàng)建材料的函數(shù)procmat_create{namecolorENuRho}{
if{[hm_entityinfoexistmats$name–byname]}{
hm_errormessage"Material$namealreadyexists"
return;
}else{
*collectorcreatematerials"$name"""$color;
*createmarkmaterials2"$name";
#RetrievematerialIDforusebelow;
setmat_id[hm_getmarkmats2]; *dictionaryloadmaterials2"[hm_infoexporttemplate]“"MAT1";
*attributeupdateintmaterials$mat_id32401201;
*attributeupdatedoublematerials$mat_id1110$E;
*attributeupdatedoublematerials$mat_id3110$Nu;
*attributeupdatedoublematerials$mat_id4110$Rho;
return;
}}練習(xí):創(chuàng)建一個(gè)材料并定義材料假設(shè)已經(jīng)打開(kāi)了OptiStruct模板,創(chuàng)建一個(gè)MAT1類(lèi)型的材料,并且把下面這些屬性添加進(jìn)去:Young’sModulus(E)210000Poisson’sratio(Nu)0.30density(Rho)7.85e-
9可以使用我們之前定義的創(chuàng)建材料的函數(shù)更新求解器有關(guān)的屬性我們也可以更新已經(jīng)存在的材料的屬性
proc
mat_update{mat_idENuRho}{
if{![hm_entityinfoexistmats$mat_id–byid]}{
hm_errormessage"Material$mat_iddoesnotexist"
return;
}else{
*createmarkmaterials2"byid""$mat_id";
*dictionaryloadmaterials2"[hm_info
exporttemplate]"\
"MAT1";
*attributeupdatedoublematerials$mat_id1110$E;
*attributeupdatedoublematerials$mat_id3110$Nu;
*attributeupdatedoublematerials$mat_id4110$Rho;
return;
}}例子:自動(dòng)定義和更新一組材料
創(chuàng)建下面三個(gè)材料,并定義材料的參數(shù):NAMEEGNURHOaluminum10200.340altairium10002000.3400steel2.00E+061.00E+060.37.
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 施工現(xiàn)場(chǎng)電氣設(shè)備維護(hù)方案
- 工程質(zhì)量事故應(yīng)急處理方案
- 標(biāo)準(zhǔn)化廠房勞務(wù)派遣管理方案
- 溝通三要素培訓(xùn)
- 道路臨時(shí)圍擋設(shè)置方案
- 城市共享單車(chē)停放管理方案
- 公園照明系統(tǒng)設(shè)計(jì)與管理方案
- 消防設(shè)施選址評(píng)估方案
- 2026年建筑工程材料與工程管理試題集
- 網(wǎng)站安全防護(hù)操作手冊(cè)
- MEMRS-ECG心電網(wǎng)絡(luò)系統(tǒng)使用說(shuō)明書(shū)
- 美國(guó)變壓器市場(chǎng)深度報(bào)告
- 建設(shè)工程第三方質(zhì)量安全巡查標(biāo)準(zhǔn)
- 乳化液處理操作規(guī)程
- 飯店轉(zhuǎn)讓協(xié)議合同
- 營(yíng)建的文明:中國(guó)傳統(tǒng)文化與傳統(tǒng)建筑(修訂版)
- 用流程復(fù)制培訓(xùn)課件
- 液化天然氣氣化站安全檢查表
- 2023年白銀有色集團(tuán)招聘筆試題庫(kù)及答案解析
- GB/T 32022-2015貴金屬覆蓋層飾品
- GB/T 26253-2010塑料薄膜和薄片水蒸氣透過(guò)率的測(cè)定紅外檢測(cè)器法
評(píng)論
0/150
提交評(píng)論