{"id":688,"date":"2020-09-28T14:56:30","date_gmt":"2020-09-28T21:56:30","guid":{"rendered":"http:\/\/gantovnik.com\/bio-tips\/?p=688"},"modified":"2021-12-15T21:02:02","modified_gmt":"2021-12-16T05:02:02","slug":"121-windows-batch-script-to-run-every-nastran-input-file-in-folder","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/121-windows-batch-script-to-run-every-nastran-input-file-in-folder\/","title":{"rendered":"#121: Windows batch script to run every Nastran input file in folder"},"content":{"rendered":"<p>This is an example of a Windows bat file to run Nastran for every *.dat file in the current folder. It also calculates the total Nastran execution time. Of course, you should change the path to nastran.exe. The nice thing here is that script uses variable set MyPath=%cd%, so you don&#8217;t need to enter the path for *.dat files Enjoy! \ud83d\ude42<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nREM @echo off\r\n@setlocal\r\nset start=%time%\r\nset MyPath=%cd%\r\ndel %MyPath%\\*.f04\r\ndel %MyPath%\\*.f06\r\ndel %MyPath%\\*.log\r\ndel %MyPath%\\*.xdb\r\ndel %MyPath%\\*.rcf\r\nfor %%x in (*.dat) do K:\\prod\\wnt\\Nastran\\2016\\bin\\nastran.exe old=no scr=yes news=no mem=max parallel=2 %MyPath%\\%%x\r\nset end=%time%\r\nset options=&quot;tokens=1-4 delims=:.&quot;\r\nfor \/f %options% %%a in (&quot;%start%&quot;) do set start_h=%%a&amp;set \/a start_m=100%%b %% 100&amp;set \/a start_s=100%%c %% 100&amp;set \/a start_ms=100%%d %% 100\r\nfor \/f %options% %%a in (&quot;%end%&quot;) do set end_h=%%a&amp;set \/a end_m=100%%b %% 100&amp;set \/a end_s=100%%c %% 100&amp;set \/a end_ms=100%%d %% 100\r\nset \/a hours=%end_h%-%start_h%\r\nset \/a mins=%end_m%-%start_m%\r\nset \/a secs=%end_s%-%start_s%\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is an example of a Windows bat file to run Nastran for every *.dat file in the current folder. It also calculates the total Nastran execution time. Of course, you should change the path to nastran.exe. The nice thing here is that script uses variable set MyPath=%cd%, so you don&#8217;t need to enter the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[17,22],"tags":[],"class_list":["post-688","post","type-post","status-publish","format-standard","hentry","category-batch","category-nastran"],"modified_by":"gantovnik","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-b6","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":900,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/02\/162-loops-using-command-line-in-bash\/","url_meta":{"origin":688,"position":0},"title":"#162 Loops using command line in bash","author":"gantovnik","date":"2021-02-19","format":false,"excerpt":"With increment: [code language=\"python\"] $ for i in {1..20..2}; do echo $i; done [\/code] Output: [code language=\"python\"] 1 3 5 7 9 11 13 15 17 19 [\/code] [code language=\"python\"] $ for word in one two three; do echo $word; done [\/code] Output: [code language=\"python\"] one two three [\/code] C-like\u2026","rel":"","context":"In &quot;bash&quot;","block_context":{"text":"bash","link":"https:\/\/gantovnik.com\/bio-tips\/category\/bash\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":936,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/06\/168-nastran-sol-106-vs-sol-400\/","url_meta":{"origin":688,"position":1},"title":"#168 Nastran SOL 106 vs SOL 400","author":"gantovnik","date":"2021-06-22","format":false,"excerpt":"#168 Nastran SOL 106 vs SOL 400 It is always challenging when it comes to nonlinear analysis, either it is geometric, material, or contact nonlinearity using SOL 106 in Nastran. For Advanced nonlinear analysis, SOL 400 is a new approach to solve the different types of nonlinear analysis. SOL 400\u2026","rel":"","context":"In &quot;buckling&quot;","block_context":{"text":"buckling","link":"https:\/\/gantovnik.com\/bio-tips\/category\/buckling\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":657,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/108-nastran-memory-settings\/","url_meta":{"origin":688,"position":2},"title":"#108: Nastran Memory Settings","author":"gantovnik","date":"2020-09-28","format":false,"excerpt":"#108: Nastran Memory Settings Memory is allocated on the MEM parameter. The MEM parameter cannot exceed memorymax. memorymax defaults to 50% of RAM and should not exceed 80% of physical RAM. It may be redefined on the command line or the RC file. The memory used by the solver can\u2026","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":675,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/116-interpretation-of-the-gap-contact-status-in-nastran-f06-file\/","url_meta":{"origin":688,"position":3},"title":"#116: Interpretation of the GAP contact status in Nastran f06 file?","author":"gantovnik","date":"2020-09-28","format":false,"excerpt":"#116: Interpretation of the GAP contact status in Nastran f06 file? Gap contact status values are 1) Open = gap open (with or without friction) 2) Slide = gap closed in the absence of friction 3) Stick = gap closed in the presence of friction and (Fy**2 + Fz**2) (MUk\u2026","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":660,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/109-how-to-output-the-stiffness-matrices-in-nastran\/","url_meta":{"origin":688,"position":4},"title":"#109: How to output the stiffness matrices in Nastran?","author":"gantovnik","date":"2020-09-28","format":false,"excerpt":"#109: How to output the stiffness matrices in Nastran? PARAM,EXTOUT,DMIGPCH The matrices will be printed in punch file *.pnch KAAX = boundary stiffness matrix PAX = boundary load matrix","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":700,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/125-xdb-vs-op2-in-nastran\/","url_meta":{"origin":688,"position":5},"title":"#125: xdb vs op2 in Nastran","author":"gantovnik","date":"2020-09-28","format":false,"excerpt":"#125: xdb vs op2 in Nastran xdb: Entry: PARAM,POST,0 Results are accessed through Direct Results Access (DRA) working directly with MSC Nastran results database 1) xdb files are compatible primarily with Patran and other MSC Software. 2) Time to read the xdb results into the Patran database is eliminated (accessed\u2026","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=688"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/688\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}