{"id":13166,"date":"2021-07-06T10:43:21","date_gmt":"2021-07-06T01:43:21","guid":{"rendered":"https:\/\/ocse2.com\/?p=13166"},"modified":"2021-07-06T17:52:49","modified_gmt":"2021-07-06T08:52:49","slug":"dexcs%e3%83%a9%e3%83%b3%e3%83%81%e3%83%a3%e3%83%bc-v2-5-%e8%a3%bd%e4%bd%9c%e3%83%a1%e3%83%a2-3","status":"publish","type":"post","link":"https:\/\/ocse2.com\/?p=13166","title":{"rendered":"DEXCS\u30e9\u30f3\u30c1\u30e3\u30fc v2.5 \u88fd\u4f5c\u30e1\u30e2\/ 3"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">3 DEXCS \u30ef\u30fc\u30af\u30d9\u30f3\u30c1 \/ \u30e9\u30f3\u30c1\u30e3\u30fc\u5316\u3078\u5411\u3051\u3066\u306e\u53d6\u308a\u7d44\u307f<\/h2>\n\n\n<p><!-- admax --><br \/>\n<script src=\"\/\/adm.shinobi.jp\/s\/f441a8efe75e3127b36ac8c4fda493f7\"><\/script><br \/>\n<!-- admax --><\/p>\n\n\n\n<p>\u307e\u305a\u306f\u3001\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\u306e\u4ed5\u7d44\u307f\u3092\u3001 CfdOF \u30ef\u30fc\u30af\u30d9\u30f3\u30c1\u3092\u5207\u308a\u96e2\u3057\u3066\u4f7f\u3048\u306a\u3044\u3082\u306e\u304b\u3092\u8abf\u3079\u3066\u307f\u305f\u3002\u30e1\u30c3<br>\u30b7\u30e5\u4f5c\u6210\u304b\u3089\u30b1\u30fc\u30b9\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u307e\u3067\u306f\u3001\u73fe\u884c\u306e DEXCS \u30e9\u30f3\u30c1\u30e3\u30fc\u3067\u5b9f\u65bd\u3067\u304d\u3066\u3044\u308b\u3068\u3044\u3046\u524d\u63d0\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3.1 \u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8 1<\/h2>\n\n\n\n<p>DEXCS \u30e9\u30f3\u30c1\u30e3\u30fc\u306b\u304a\u3051\u308b<img decoding=\"async\" width=\"24\" height=\"24\" class=\"wp-image-12735\" style=\"width: 24px;\" src=\"https:\/\/ocse2.com\/wp-content\/uploads\/2020\/06\/plotWatcher.png\" alt=\"\">[plotWatcher \u306e\u8d77\u52d5 ] \uff08\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\u8868\u793a\uff09\u306f\u3001 runPlotWatcher.py \u3067\u3001<br>PyFoam \u306e pyFoamPlotWatcher.py \u3092\u8d77\u52d5\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3082\u306e\u3067\u3042\u3063\u305f (94 \u301c 109 \u884c\u76ee ) \u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>94: cont = \"#!\/bin\/bash\\n\"\n95: cont = cont + \". \" + envOpenFOAMFix + \"\\n\"\n96: cont = cont + \u2019echo -n \"running plotWatcher\"\\n\u2019\n97: cont = cont + \"pyFoamPlotWatcher.py \" + logFile + \" 1&gt; \/dev\/null 2&gt; \/dev\/null\\n\"\n98: f = open(\"plotWatcher\", \"w\")\n99: f.write(cont)\n100: f.close()\n101: os.system(\"chmod a+x plotWatcher\")\n102: title = solveCaseFix\n103: if len(title) &gt; 30:\n104: title = \"_...\" + title&#91;-30:]\n105: title = \"plotWatcher:\" + title\n106: #comm = \"gnome-terminal --name=\" + title + \" --geometry=80x2 --hide-menubar -x bash --rcfil\n107: comm = \"gnome-terminal --name=\" + title + \" --geometry=80x2 --hide-menubar -- bash --rcfile\n108: os.system(comm)\n109: 9os.chdir(saveDir)<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u90e8\u5206\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>156:\n#print(logFile)\n157:\n158: UxResiduals = &#91;]\n159: UyResiduals = &#91;]\n160: UzResiduals = &#91;]\n161: pResiduals = &#91;]\n162: rhoResiduals = &#91;]\n163: EResiduals = &#91;]\n164: kResiduals = &#91;]\n165: omegaResiduals = &#91;]\n166: niter = 0\n167: itimer=1\n168:\n169: residualPlot = ResidualPlot()\n170:\n171: #Timer.setInterval(2000)\n172: #Timer.timeout.connect(_plotResidual(logFile, niter))\n173: #Timer.start()\n174: #while itimer:\n175: _plotResidual(logFile, niter)\n176: #sleep(2)\n177: #_plotResidual(logFile, niter)\n178: #sleep(2)\n179: #_plotResidual(logFile, niter)\n180: #sleep(2)<\/code><\/pre>\n\n\n\n<p>169 \u884c\u76ee\u3067\u3001 ResidualPlot() \u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u308b\u304c\u3001\u3053\u306e\u6bb5\u968e\u3067\u306f CfdOF \u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u306e\u306f\u8003\u3048\u3066\u3044\u306a\u3044\u306e\u3067\u3001<br>\u4fbf\u5b9c\u7684\u306b CfdOF \u30e2\u30b8\u30e5\u30fc\u30eb\u4e2d\u306e\u3001 CfdResidualPlot.py \u3068\u540c\u3058\u5185\u5bb9\u3067\u3001 dexcsCfdResidualPlot.py \u3092\u7528\u610f\u3057<br>\u3066\u3001 12 \u884c\u76ee<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from dexcsCfdResidualPlot import ResidualPlot<\/code><\/pre>\n\n\n\n<p>\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3002\u307e\u305f\u3001 175 \u884c\u76ee plotResidual(logFile, niter) \u306e\u5b9f\u4f53\u306f\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>113: def _plotResidual(logFile, niter):\n114: print(\"log=\",logFile)\n115: f=open(modelDir+\"\/\"+logFile)\n116: loglines = f.readlines()\n117: #f.close()\n118: process_output(loglines, niter)\n119: residualPlot.updateResiduals<\/code><\/pre>\n\n\n\n<p>logFile \u3092\u8aad\u307f\u8fbc\u3093\u3067\u3001\u305d\u306e\u5185\u5bb9\u3092 process output(loglines, niter) \u306b\u6e21\u3057\u3066\u3001 residualPlot.updateResiduals<br>\uff08\u30d7\u30ed\u30c3\u30c8\u56f3\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\uff09\u3057\u3088\u3046\u3068\u3059\u308b\u3082\u306e\u3067\u3001 CfdRunnableFoam.py \u4e2d\u306e\u305d\u308c\u3092\u771f\u4f3c\u3057\u3066\u4f5c\u6210\u3057\u305f\u3082\u306e<br>\u3067\u3042\u308b\u3002 process output(loglines, niter) \u3082\u3001 CfdOF \u30e2\u30b8\u30e5\u30fc\u30eb\u3068\u306e\u9023\u643a\u3092\u8003\u3048\u3066\u3044\u306a\u3044\u306e\u3067\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>66: def process_output(text, niter):\n67: itimer = 0\n68: for line in text:\n69: #print(line),\n70: split = line.split()\n71:\n72: # Only store the first residual per timestep\n73: if line.startswith(u\"Time = \"):\n74: niter += 1\n75:\n76: # print split\n77: if \"Ux,\" in split and niter-1 &gt; len(UxResiduals):\n78: UxResiduals.append(float(split&#91;7].split(\u2019,\u2019)&#91;0]))\n79: if \"Uy,\" in split and niter-1 &gt; len(UyResiduals):\n80: ... \u4ee5\u4e0b\u7701\u7565 ...<\/code><\/pre>\n\n\n\n<p>\u3068\u3001 CfdOF \u30e2\u30b8\u30e5\u30fc\u30eb\u306e CfdRunnableFoam.py \u4e2d\u306e 102 \u884c\u76ee def process output(self,text) \u306e\u5185\u5bb9\u3092\u307b\u3068<br>\u3093\u3069\u305d\u306e\u307e\u307e\u6d41\u7528\u3057\u305f\u3002 CfdOF \u30aa\u30ea\u30b8\u30ca\u30eb\u304b\u3089\u306e\u5909\u66f4\u70b9\u3068\u3057\u3066\u3001\u5f15\u6570\u3068\u3057\u3066 niter \u3092\u52a0\u3048\u3066\u3042\u308b\u304c\u3001\u3053\u308c\u306f<br>\u30a4\u30bf\u30ec\u30fc\u30b7\u30e7\u30f3\u56de\u6570\u3092\u898b\u306a\u304c\u3089\u81ea\u52d5\u66f4\u65b0\u51e6\u7406\u3092\u51fa\u6765\u306a\u3044\u304b\u3068\u5de5\u592b\u306e\u540d\u6b8b\u308a\u3067\u3042\u308b\u3002\u307e\u305f\u3001 171 \u884c\u76ee\u301c 180 \u884c\u76ee<br>\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u305f\u884c\u3082\u3001\u540c\u3058\u76ee\u7684\u3067\u8a66\u884c\u932f\u8aa4\u3057\u305f\u3082\u306e\u3067\u3001\u73fe\u6642\u70b9\u3067\u81ea\u52d5\u66f4\u65b0\u51e6\u7406\u306f\u51fa\u6765\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u3053<br>\u308c\u3089\u306e\u90e8\u5206\u306f\u4e0d\u8981\u3067\u3042\u308b\u3002<br>\u4ee5\u4e0a\u306e\u6539\u5909\u306b\u3066\u3001\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\u306f CfdOF \u3068\u540c\u3058\u3082\u306e\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\uff08\u898b\u6804\u3048\u306f\u826f\u304f\u306a\u3063\u305f\uff01\uff09\u3002<br>\u4f46\u3057\u3001\u4e0a\u8a18\u8aac\u660e\u306e\u4e2d\u3067\u8a18\u3057\u305f\u3088\u3046\u306b\u3001\u8a08\u7b97\u306e\u958b\u59cb\u76f4\u5f8c\u306b\u3053\u308c\u3092\u8d77\u52d5\u3057\u3066\u3001\u8a08\u7b97\u306e\u9032\u884c\u3068\u3068\u3082\u306b\u81ea\u52d5\u66f4\u65b0\u51e6\u7406\u3092<br>\u3055\u305b\u3088\u3046\u3068\u8a66\u307f\u305f\u304c\u3001\u5b9f\u73fe\u3067\u304d\u3066\u3044\u306a\u3044\u3002<br>\u3053\u3053\u3067\u4e00\u65e6\u3001\u81ea\u52d5\u66f4\u65b0\u306e\u8a66\u307f\u3092\u65ad\u5ff5\u3057\u3066\u3001\u6b21\u7bc0\u3067\u306f\u5225\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u6b8b\u5dee\u30b0\u30e9\u30d5\u8868\u793a\u306b\u53d6\u308a\u7d44\u3080\u3053\u3068\u3068\u3059\u308b<br>\u304c\u3001\u305d\u306e\u524d\u306b\u672c\u7bc0\u306e\u53d6\u308a\u7d44\u307f\u3067\u5224\u3063\u305f\u3053\u3068\u3092\u8a18\u3057\u3066\u304a\u304f\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"fact17\">\u5224\u660e\u9805\u76ee17<\/h5>\n\n\n\n<p>CfdOF \u306e\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\u306f\u3001\u8a08\u7b97\u5b9f\u884c\u6642\u306e\u6a19\u6e96\u51fa\u529b\u3092\u30e2\u30cb\u30bf\u30fc\u3057\u3066\u3044\u308b\u306e\u306b\u5bfe\u3057\u3066\u3001\u4eca\u56de\u8a66\u307f\u305f\u306e\u306f\u3001<br>\u5b9f\u884c\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3092\u8aad\u307f\u76f4\u3059\u65b9\u6cd5\u3067\u3042\u308a\u3001\u3053\u308c\u3067\u306f\u7121\u7406\u3063\u307d\u3044\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"fact18\">\u5224\u660e\u9805\u76ee18<\/h5>\n\n\n\n<p><br>PyFoam \u306e plotWatcher.py \u306f\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u3092\u76e3\u8996\u3057\u3064\u3064\u66f4\u65b0\u3057\u3066\u3044\u308b\uff08\u591a\u5206\u3001\u8aad\u307f\u76f4\u3057\u305f\u308a\u306f\u3057\u3066\u3044<br>\u306a\u3044\uff09\u306e\u3067\u3001\u305d\u306e\u65b9\u6cd5\u306b\u7fd2\u3048\u3070\u3001\u5b9f\u73fe\u3067\u304d\u308b\u53ef\u80fd\u6027\u3082\u3042\u308b\u306e\u3067\u3001\u6539\u3081\u3066\u8abf\u67fb\u4e88\u5b9a\u3002<br><\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"fact19\">\u5224\u660e\u9805\u76ee19<\/h5>\n\n\n\n<p>DEXCS \u30e9\u30f3\u30c1\u30e3\u30fc\u3067\u3001 postProcessing \u30d5\u30a9\u30eb\u30c0\u4e2d\u306b\u51fa\u529b\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3092\u30d7\u30ed\u30c3\u30c8\u3059\u308b\u306e\u306b\u3001 JGNPlot<br>\u3092\u4f7f\u3063\u3066\u3044\u308b\u304c\u3001 CfdResidualPlot.py \u3092\u53c2\u8003\u306b Plot \u30ef\u30fc\u30af\u30d9\u30f3\u30c1\u3067\u4ee3\u7528\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u306a<br>\u3044\u306e\u3067\u3001\u3053\u308c\u3082\u6539\u3081\u3066\u8abf\u67fb\u4e88\u5b9a\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/ocse2.com\/?p=13124\">\u524d\u3078<\/a>\u3000<a href=\"https:\/\/ocse2.com\/?p=13115\">\u76ee\u6b21<\/a>\u3000<a href=\"https:\/\/ocse2.com\/?p=13168\">\u6b21\u3078<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>3 DEXCS \u30ef\u30fc\u30af\u30d9\u30f3\u30c1 \/ \u30e9\u30f3\u30c1\u30e3\u30fc\u5316\u3078\u5411\u3051\u3066\u306e\u53d6\u308a\u7d44\u307f \u307e\u305a\u306f\u3001\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\u306e\u4ed5\u7d44\u307f\u3092\u3001 CfdOF \u30ef\u30fc\u30af\u30d9\u30f3\u30c1\u3092\u5207\u308a\u96e2\u3057\u3066\u4f7f\u3048\u306a\u3044\u3082\u306e\u304b\u3092\u8abf\u3079\u3066\u307f\u305f\u3002\u30e1\u30c3\u30b7\u30e5\u4f5c\u6210\u304b\u3089\u30b1\u30fc\u30b9\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u307e\u3067\u306f\u3001\u73fe\u884c\u306e DEX [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[17],"tags":[74,48,28,23,13],"class_list":["post-13166","post","type-post","status-publish","format-standard","hentry","category-toolstips","tag-cfdof","tag-cfmesh","tag-dexcs","tag-freecad","tag-openfoam"],"views":173,"_links":{"self":[{"href":"https:\/\/ocse2.com\/index.php?rest_route=\/wp\/v2\/posts\/13166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ocse2.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ocse2.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ocse2.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ocse2.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13166"}],"version-history":[{"count":2,"href":"https:\/\/ocse2.com\/index.php?rest_route=\/wp\/v2\/posts\/13166\/revisions"}],"predecessor-version":[{"id":13196,"href":"https:\/\/ocse2.com\/index.php?rest_route=\/wp\/v2\/posts\/13166\/revisions\/13196"}],"wp:attachment":[{"href":"https:\/\/ocse2.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ocse2.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ocse2.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}