


{"id":279779,"date":"2023-04-17T12:26:35","date_gmt":"2023-04-17T12:26:35","guid":{"rendered":"\/forum\/?post_type=topic&#038;p=279779"},"modified":"2023-04-19T17:08:51","modified_gmt":"2023-04-19T17:08:51","slug":"apdl-real-constant-defined-in-a-table-for-static-analysis","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/apdl-real-constant-defined-in-a-table-for-static-analysis\/","title":{"rendered":"APDL: real constant defined in a table for static analysis"},"content":{"rendered":"<p>I would like to perform multiple static analyses changing the stiffness properties of a spring (COMBIN14). According to its documentation, the stiffnesses can be given in a table, setting TIME as the primary variable. But I cannot get the solution to consider all stiffness values in a single session.<\/p>\n<p>Following is a minimum example that does not work, only showing the solution for the first value of the table. It isn&#8217;t clear in the documentation how to change the TIME for linear static analyses. I tried changing the TIME manually in a *DO-*ENDDO loop, but that either doesn&#8217;t work or shows a warning message about non-standard use, which according to the COMBIN14 documentation, should be standard.<\/p>\n<div>\n<div>Edit 1: added missing Dirichlet boundary condition to spring nodes. The results still only show one solution (one set, one TIME, one LOAD STEP&#8230;), that for a zero stiffness spring.<\/div>\n<div>&nbsp;<\/div>\n<div>Edit 2: Fixed code. It should work now, as expected.<\/div>\n<div>&nbsp;<\/div>\n<div>FINI<\/div>\n<div>\/CLEAR<\/div>\n<div>\/FILNAME, mwe<\/div>\n<div>\/TITLE, mwe<\/div>\n<div>&nbsp;<\/div>\n<div>\/PREP7<\/div>\n<div>! element types<\/div>\n<div>ET, 1, PLANE42,,1,2&nbsp; &nbsp;! simple elastic plane strain<\/div>\n<div>&nbsp;<\/div>\n<div>ET, 2, COMBIN14,,2&nbsp; &nbsp; ! spring in Y direction<\/div>\n<div>&nbsp;<\/div>\n<div>! properties&nbsp;<\/div>\n<div>MP, EX, 1, 200E6<\/div>\n<div>MP, PRXY, 1, 0.29<\/div>\n<div>&nbsp;<\/div>\n<div>max_stiff = 10**9&nbsp; ! maximum spring stiffness<\/div>\n<div>&nbsp;<\/div>\n<div>n_stiff = 5&nbsp; ! number of stiffness increments<\/div>\n<div>&nbsp;<\/div>\n<div>! table of stiffness values<\/div>\n<div>*DIM, k_tab, TABLE, n_stiff, , , TIME<\/div>\n<div>k_tab(0,1) = 1&nbsp; &nbsp;! zero-th row, first column<\/div>\n<div>*VFILL, k_tab(1,0), RAMP, 1, 1&nbsp; ! zero-th column, 1 to n_stiff<\/div>\n<div>*DO, i, 2, n_stiff, 1<\/div>\n<div>&nbsp; &nbsp; k_tab(i) = 10**(LOG10(max_stiff)*i\/n_stiff)<\/div>\n<div>*ENDDO<\/div>\n<div>&nbsp;<\/div>\n<div>! real constants for COMBIN14 using k_tab<\/div>\n<div>R, 1, %k_tab%&nbsp; ! I don&#8217;t know how to use this<\/div>\n<div>&nbsp;<\/div>\n<div>! mesh<\/div>\n<div>N, 1, 0.0, 0.0<\/div>\n<div>N, 2, 0.1, 0.0<\/div>\n<div>N, 3, 0.0, 0.1<\/div>\n<div>N, 4, 0.1, 0.1<\/div>\n<div>&nbsp;<\/div>\n<div>N, 5, 0.0, 0.2<\/div>\n<div>N, 6, 0.1, 0.2<\/div>\n<div>&nbsp;<\/div>\n<div>TYPE, 1<\/div>\n<div>E, 1, 2, 4, 3<\/div>\n<div>&nbsp;<\/div>\n<div>TYPE, 2<\/div>\n<div>REAL, 1<\/div>\n<div>E, 3, 5<\/div>\n<div>E, 4, 6<\/div>\n<div>&nbsp;<\/div>\n<div>FINI<\/div>\n<div>&nbsp;<\/div>\n<div>\/SOLU<\/div>\n<div>&nbsp;<\/div>\n<div>SELTOL, 1E-15<\/div>\n<div>&nbsp;<\/div>\n<div>NSEL, S, LOC, Y, 0<\/div>\n<div>D, ALL, ALL, 0<\/div>\n<div>ALLSEL<\/div>\n<div>&nbsp;<\/div>\n<div>! Edit 1: forgot to clamp upper spring nodes<\/div>\n<div>NSEL, S, LOC, Y, 0.2<br \/>D, ALL, ALL, 0<br \/>ALLSEL<\/div>\n<div>&nbsp;<\/div>\n<div>NSEL, S, LOC, X, 0.1<\/div>\n<div>NSEL, R, LOC, Y, 0.1<\/div>\n<div>F, ALL, FX, 1000<\/div>\n<div>F, ALL, FY, 1000<\/div>\n<div>&nbsp;<\/div>\n<div>ALLSEL<\/div>\n<div>&nbsp;<\/div>\n<div>ANTYPE, STATIC, NEW<\/div>\n<div>EQSLV, SPAR, 0,<\/div>\n<div>&nbsp;<\/div>\n<div>!SOLVE&nbsp; ! this was here previously to edit 2<\/div>\n<div>&nbsp;<\/div>\n<div>! Edit 2: now working as intended<\/div>\n<div>NROPT, FULL&nbsp; ! THIS IS THE MISSING PIECE<\/div>\n<div>TM_START = 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! start time<br \/>TM_END = n_stiff &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ! ending time<br \/>TM_INCR = 1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;! time increment<br \/>*DO, TM, TM_START, TM_END, TM_INCR<br \/>&nbsp; &nbsp; TIME, TM &nbsp;! set time<br \/>&nbsp; &nbsp; SOLVE<br \/>*ENDDO<\/div>\n<div>&nbsp;<\/div>\n<div>FINI<\/div>\n<div>&nbsp;<\/div>\n<div>\/POST1<\/div>\n<div>SET, FIRST<\/div>\n<div>ESEL, S, TYPE, , 1<\/div>\n<div>\/EFACET, 1<\/div>\n<div>PLNSOL, U, SUM, 2, 1.0<\/div>\n<div>\/CONTOUR,1,64,AUTO,,<\/div>\n<div>\/REPLOT<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-279779","topic","type-topic","status-closed","hentry","topic-tag-ansys-mechanical","topic-tag-apdl","topic-tag-multiple-load-steps-1","topic-tag-static-structural"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":["23.192.164.14"],"_bbp_subscription":["274583","20905"],"_btv_view_count":["2737"],"_edit_lock":["1681924137:205295"],"_bbp_status":["publish"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["279779"],"_bbp_forum_id":["27791"],"_bbp_engagement":["20905","274583"],"_bbp_voice_count":["2"],"_bbp_reply_count":["11"],"_bbp_last_reply_id":["280403"],"_bbp_last_active_id":["280403"],"_bbp_last_active_time":["2023-04-19 16:51:18"]},"test":"b-v-dealmeidatudelft-nl"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/279779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/279779\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=279779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}