




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、WORKSHOP 12EXTERNAL RESPONSE (DRESP3)Objective:Learn how to set up an external response optimization task using the same box design problem used in Workshop 2. You will write Fortran routines to define the volume and surface area instead of using DEQATN entries.Suggested Exercise StepsGenerate an In
2、put File for MSC.NASTRAN users.Compare the Input File Modify DRESP3 Server Routine, r3sgrtCompare the modified server routine, r3sgrtModify server routine to define volume and surface areaCompare modified server routine, r3svaldBuild the response serverSubmit Input file for MSC.Nastran for analysisV
3、iew ResultsModel DescriptionObjective Function: Minimize the material surface area.S = 2 * ( W * H + L * H + 2.0 * W * L )Design Variables: W (Width), H (Height), L (Length)Constraints:Volume: V = H * W * L 2.0Initial DesignOptimum Design H = 1.5 H = 2.0W = 1.5 W = 1.0 L = 1.5 L = 1.0 S = 18.0 S = 1
4、2.0 V = 3.375 V = 2.0 Following the instructions given in the input file, wkshp12_fillin.dat to complete the exercise. The following input file is provided as a starting point.1. Generating an Input File for MSC.NASTRAN Users$ Define an external response group using a CONNECT entry. Notice that$ the
5、 group name must be referenced by the subsequent DRESP3 entriesCONNECT TIME 5diag 8,56 $SOL 200CENDTITLE = BOX MATERIAL MINIMIZATION WITH A VOLUME CONSTRAINT D200X8DESOBJ = 2DESSUB = 1SUBTITLE = INITIAL DESIGN: W=1.5, L=1.5, AND H=1.5$DISPLACEMENT = ALLSTRESS = NONESPC = 1ANALYSIS = STATICSLOAD = 1B
6、EGIN BULK$ DUMMY STRUCTURAL MODEL (NOT USED)FORCE 1 2 1.0E7 1.0 0.0 0.0GRID 1 0.0 0.0 0.0GRID 2 1.0 0.0 0.0MAT1 1 1.0E7 0.3 0.1CROD 1 1 1 2PROD 1 1 1.0SPC1 1 23456 2SPC1 1 123456 1$ DUMMY DESIGN PROPERTY RELATIONS$DVPREL11PROD1431.0$ BOX DESIGN PROBLEM DEFINITION$DESVAR DESVAR 2 L 1.5 0.1 10.0DESVAR
7、 3 H 1.5 0.1 10.0$ Define volume and surface area using DRESP3 entriesDRESP3DRESP3DCONSTR 1 1 2.0 1.0E35DSCREEN DRESP3 -100.0 1DOPTPRM DESMAX 10delp1.0gmax1.e-16ctmin1.e-16ENDDATA2. Compare the Input FileThe completed input file is shown below:CONNECT DRESP3 WKSHOP EXTRESPTIME 5diag 8,56 $SOL 200CEN
8、DTITLE = BOX MATERIAL MINIMIZATION WITH A VOLUME CONSTRAINT D200X8DESOBJ = 2DESSUB = 1SUBTITLE = INITIAL DESIGN: W=1.5, L=1.5, AND H=1.5$DISPLACEMENT = ALLSTRESS = NONESPC = 1ANALYSIS = STATICSLOAD = 1BEGIN BULK$ DUMMY STRUCTURAL MODEL (NOT USED)$FORCE 1 2 1.0E7 1.0 0.0 0.0GRID 1 0.0 0.0 0.0GRID 2 1
9、.0 0.0 0.0MAT1 1 1.0E7 0.3 0.1CROD 1 1 1 2PROD 1 1 1.0SPC1 1 23456 2SPC1 1 123456 1$ DUMMY DESIGN PROPERTY RELATIONS$DVPREL11PROD1431.0$ BOX DESIGN PROBLEM DEFINITION$DESVAR 1 W 1.5 0.1 10.0DESVAR 2 L 1.5 0.1 10.0DESVAR 3 H 1.5 0.1 10.0DRESP3 1 VOLUME WKSHOP VOLUME DESVAR 1 2 3DRESP3 2 SURFACE WKSHO
10、P SURFACE DESVAR 1 2 3DCONSTR 1 1 2.0 1.0E35DSCREEN DRESP3 -100.0 1DOPTPRM DESMAX 10delp1.0gmax1.e-16ctmin1.e-16ENDDATA3. Modify DRESP3 Server Routine, R3SGRTModify DRESP3 server routine, r3grt to define response types. SUBROUTINE R3SGRT(GRPID,TYPNAM,ERROR)C 09/18/00;14:24:09 cdp 2001t1 na001130C Up
11、date dr3srv per SHZC C PURPOSE: VERIFY THE EXTERNAL RESPONSE TYPEC ArgumentsC GRPID input integer - Group IDC TYPNAM input character*8 - Name of external response typeC ERROR input/output integer -error code for the call.CC MethodC Match the user input: typnam with the list of availableC external re
12、sponse types. If no match is found, set error code.C Called byC R3CGRTC NOTE:C The writer of this routine is responsible to specifyC NTYPES and R3TYPE.C C VARIABLES PASSED IN INTEGER GRPID, ERROR CHARACTER*8 TYPNAMC LOCAL VARIABLES INTEGER BADTYPCC declaration for character array R3TYPE and initiali
13、ze character C array R3TYPE with corresponding R3TYPE from DRESP3s DATA BADTYP/7554/ ERROR = 0 DO 100 ITYPE = 1, NTYPES IF (TYPNAM .EQ. R3TYPE(ITYPE) THEN GOTO 200 END IF100 CONTINUE ERROR = BADTYP200 CONTINUE RETURN END4. Compare the Server Routine, R3SGRTThe listing of server routine, r3grt is sho
14、wn here: SUBROUTINE R3SGRT(GRPID,TYPNAM,ERROR)C 09/18/00;14:24:09 cdp 2001t1 na001130C Update dr3srv per SHZC CC PURPOSE: VERIFY THE EXTERNAL RESPONSE TYPECC GRPID input integer - Group IDC TYPNAM input character*8 - Name of external response typeC ERROR input/output integer -error code for the call
15、.CC MethodC Match the user input: typnam with the list of availableC external response types. If no match is found, set error code.CC Called byC R3CGRTCC NOTE:C The writer of this routine is responsible to specifyC NTYPES and R3TYPE.C CC VARIABLES PASSED INC INTEGER GRPID, ERROR CHARACTER*8 TYPNAMCC
16、 LOCAL VARIABLESC INTEGER NTYPES, BADTYP PARAMETER(NTYPES=2) CHARACTER*8 R3TYPE(NTYPES)C DATA BADTYP/7554/ DATA R3TYPE/VOLUME,SURFACE/ ERROR = 0 DO 100 ITYPE = 1, NTYPES IF (TYPNAM .EQ. R3TYPE(ITYPE) THEN GOTO 200 END IF100 CONTINUE ERROR = BADTYP200 CONTINUEC RETURN END Modify DRESP3 server routine
17、, r3vald to define volume and surface area.5. Modify Server Routine to Define Volume and Surface Area SUBROUTINE R3SVALD(GRPID,TYPNAM, . NITEMS,ARGLIS, . NSIZE, ARGVAL, . NWRDA8,ARGCHR, . DR3VAL,ERROR)C CC PURPOSE: COMPUTE THE EXTERNAL RESPONSECC GRPID input integer - Group idC TYPNAM input characte
18、r*8 - Name of external response typeC NITEMS input integer - dimension of array ARGLISC NSIZE input integer - dimension of array ARGVALC NWRDA8 input integer - dimension of character array ARGCHRC ARGLIS input integer - array of no. of items for each argumentC ARGVAL input double - array of all argu
19、ment valuesC ARGCHR input character*8 - array of charactersC DR3VAL output double - value of the external responseC ERROR input/output integer -error code for the call.C 0 = print error messagesC 1 = do not print error messages.CC Portion of routine is omittedCC LOCAL VARIABLESC INTEGER BADTYPC decl
20、are user defined variables C DATA BADTYP /7554/CC THE USER-SUPPLIED EQUATION TO DEFINE THE EXTERNAL RESPONSEC DEQATN 1 F(W,L,H)=W*L*HC DEQATN 2 F(W,L,H)=2.0*(W*H+L*H+2.0*W*L)C ERROR = 0CC define equations of volume and surface areaC RETURN END6. Compare the modified Server Routine, R3SVALDThe listin
21、g of server routine, r3vald is shown here. Notice there are many ways to modify this routine: SUBROUTINE R3SVALD(GRPID,TYPNAM, . NITEMS,ARGLIS, . NSIZE, ARGVAL, . NWRDA8,ARGCHR, . DR3VAL,ERROR)C 07/02/01;11:30:11 cdp V2001 nxf01800C Update per SHZC CC PURPOSE: COMPUTE THE EXTERNAL RESPONSECC GRPID i
22、nput integer - Group idC TYPNAM input character*8 - Name of external response typeC NITEMS input integer - dimension of array ARGLISC NSIZE input integer - dimension of array ARGVALC NWRDA8 input integer - dimension of character array ARGCHRC ARGLIS input integer - array of no. of items for each arg
23、umentC ARGVAL input double - array of all argument valuesC ARGCHR input character*8 - array of charactersC DR3VAL output double - value of the external responseC ERROR input/output integer -error code for the call.C 0 = print error messagesC 1 = do not print error messages.CC MethodC A)Set up variou
24、s parameters from the argument listC B)Evaluate the external response based on the given TYPNAMC C)Return BADTYP error if TYPNAM is not matched here.CC Called byC SendR3svaldC C6. Compare the modified Server Routine (Cont.)CC VARIABLES PASSED INC CHARACTER*8 TYPNAM, ARGCHR(NWRDA8) INTEGER GRPID, NIT
25、EMS, NSIZE, ARGLIS(NITEMS), ERROR DOUBLE PRECISION ARGVAL(NSIZE), DR3VALCC LOCAL VARIABLESC INTEGER BADTYP DOUBLE PRECISION W,L,HC DATA BADTYP /7554/CC THE USER-SUPPLIED EQUATION TO DEFINE THE EXTERNAL RESPONSEC DEQATN 1 F(W,L,H)=W*L*HC DEQATN 2 F(W,L,H)=2.0*(W*H+L*H+2.0*W*L)C ERROR = 0CC set up par
26、ameters for various argument itemsC W = argval(1) L = argval(2) H = argval(3) IF (TYPNAM .EQ. VOLUME) THEN VOL = W*L*H dr3val = VOL ELSE IF (TYPNAM .EQ. SURFACE) THEN SURF = 2.D0*(W*H+L*H+2.D0*W*L) DR3VAL = SURF ELSE ERROR = BADTYP END IF RETURN END Build the response server using the following comm
27、and: msc2001 ./dr3srv build Generate a connection evaluator file, called wkshp12_eval that associates the external response group with the actual server program. The full content of file, wkshp12_eval is shown here. Submit the Nastran job by adding a new keyword, gmconn where gmconn refers to the ev
28、aluator file name. 7. Build Response ServerEXTRESP, - , /home/wkshop/server/dr3serv To submit the MSC.Nastran .dat file, find an available UNIX shell window and at the command prompt enter Nastran fn scr=yes gmconn=wkshp12_eval8. Submit Input File to MSC.Nastran For AnalysisWhen the run is completed
29、, edit the wkshp12.f06 file and search for the word FATAL. If no matches exist, search for the word WARNING. Determine whether existing WARNING messages indicate modeling errors.While still editing wkshp12.f06, search for the word “H I S T O R Y”. Compare the results obtained in the .f06 file with the following:9. View Results * S U M M A R Y O F D E S I G N C Y C L E H I S T O R Y * (HARD CONVERGENCE ACHIEVED)
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 合川区初中“七校联盟”2025年春期半期质量检测七年级 英语试题
- 投资基金合同履约金的管理
- 《Python程序设计基础》课件 第7、8章 面向对象编程;文件与异常
- 《Python程序设计基础》课件 第5-8章 函数与模块-文件与异常
- 铁路工程安全技术石家庄铁路35课件
- 《GB 18399-2001棉花加工机械安全要求》(2025版)深度解析
- ARM Cortex-M3嵌入式开发及应用教与学 课件 第12、13章 信号量与互斥信号量;消息邮箱与消息队列
- 大学生职业规划大赛《英语专业》生涯发展展示
- 简单版度个人耕地承包协议
- 农产品购销合作协议
- 磁场对通电导线的作用力课件-高二下学期物理人教版选择性2
- 文职考试题库试卷及答案
- 2025-2030中国电气火灾监控模块竞争战略规划与需求预测分析研究报告
- 2025年临床执业医师考试的医学影像试题及答案
- 2025年养老护理员养老机构管理考试试卷
- 【报批稿】XX市三万亩盐碱地改良工程项目可行性研究报告
- 锅炉施工安全文明方案
- 2024福建福州闽投海上风电汇流站有限公司招聘8人笔试参考题库附带答案详解
- 中国输电线路在线监测系统行业发展状况及前景规模调查报告2025-2030年
- 第18课《井冈翠竹》课件-2024-2025学年统编版语文七年级下册
- 2025年河南林业职业学院高职单招语文2018-2024历年参考题库频考点含答案解析
评论
0/150
提交评论