


{"id":250960,"date":"2023-02-22T09:01:05","date_gmt":"2023-02-22T09:01:05","guid":{"rendered":"\/forum\/forums\/topic\/running-the-system-sequentially\/"},"modified":"2023-02-22T17:57:19","modified_gmt":"2023-02-22T17:57:19","slug":"running-the-system-sequentially","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/running-the-system-sequentially\/","title":{"rendered":"Running the system sequentially"},"content":{"rendered":"<p>Hi Ansys Team,<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I am able to run the ansys static structural with journal commands, but I want to run 2 to 3 systems in a sequential manner. So how can I modify my journal file so that one system is run will be followed by next system run.<\/p>\n<p><strong>SetScriptVersion(Version=&#8221;22.2.192&#8243;)<\/strong><br \/><strong>template1=GetTemplate(TemplateName=&#8221;Static Structural&#8221;,Solver=&#8221;ANSYS&#8221;)<\/strong><br \/><strong>system1=template1.CreateSystem()<\/strong><br \/><strong>geometry1=system1.GetContainer(ComponentName=&#8221;Geometry&#8221;)<\/strong><br \/><strong>geometry1.SetFile(FilePath=&#8221;C:\/Users\/cadfem\/Downloads\/Geom.agdb&#8221;)<\/strong><\/p>\n<p><strong>modelComponent1 = system1.GetComponent(Name=&#8221;Model&#8221;)<\/strong><br \/><strong>modelComponent1.Refresh()<\/strong><br \/><strong>model1 = system1.GetContainer(ComponentName=&#8221;Model&#8221;)<\/strong><br \/><strong>model1.Edit(Interactive=False)<\/strong><br \/><strong>DSscript = open(&#8220;D:scrt.py&#8221;, &#8220;r&#8221;)<\/strong><br \/><strong>DSscriptcommand=DSscript.read()<\/strong><br \/><strong>DSscript.close()<\/strong><br \/><strong>model1.SendCommand(Language=&#8217;Python&#8217;, Command = DSscriptcommand)<\/strong><br \/><strong>######<\/strong><br \/><strong>system2=template1.CreateSystem()<\/strong><br \/><strong>geometry2=system2.GetContainer(ComponentName=&#8221;Geometry&#8221;)<\/strong><br \/><strong>geometry2.SetFile(FilePath=&#8221;C:\/Users\/cadfem\/Downloads\/Geom.agdb&#8221;)<\/strong><\/p>\n<p><strong>modelComponent2 = system2.GetComponent(Name=&#8221;Model&#8221;)<\/strong><br \/><strong>modelComponent2.Refresh()<\/strong><br \/><strong>model2 = system2.GetContainer(ComponentName=&#8221;Model&#8221;)<\/strong><br \/><strong>model2.Edit(Interactive=False)<\/strong><br \/><strong>DSscript = open(&#8220;D:scrt.py&#8221;, &#8220;r&#8221;)<\/strong><br \/><strong>DSscriptcommand=DSscript.read()<\/strong><br \/><strong>DSscript.close()<\/strong><br \/><strong>model2.SendCommand(Language=&#8217;Python&#8217;, Command = DSscriptcommand)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>On executing the above journal both system are running at a time, Please help<\/p>\n<p>Can the GetSimulationResultFile() helps the journal file to wait until one system run is done<\/p>\n","protected":false},"template":"","class_list":["post-250960","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["161210","200"],"_bbp_author_ip":["23.56.168.214"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1532"],"_edit_lock":["1677088550:45673"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["250960"],"_bbp_forum_id":["27791"],"_bbp_engagement":["200","161210"],"_bbp_voice_count":["2"],"_bbp_reply_count":["6"],"_bbp_last_reply_id":["251533"],"_bbp_last_active_id":["251533"],"_bbp_last_active_time":["2023-02-25 11:45:13"]},"test":"pavankonchada123"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/250960","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\/250960\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=250960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}