{"id":197,"date":"2012-06-17T21:48:04","date_gmt":"2012-06-17T13:48:04","guid":{"rendered":"https:\/\/guerillamotive.com\/?p=197"},"modified":"2016-04-02T16:46:50","modified_gmt":"2016-04-02T08:46:50","slug":"june-17-2012-body-design-openfoam-cfd","status":"publish","type":"post","link":"https:\/\/guerillamotive.com\/?p=197","title":{"rendered":"June 17, 2012.  Body Design.  OpenFOAM CFD."},"content":{"rendered":"<p>I&#8217;ve started working on the design of the body more seriously than before. \u00c2\u00a0My previous attempts at using <a href=\"http:\/\/en.wikipedia.org\/wiki\/Computational_fluid_dynamics\">CFD<\/a>\u00c2\u00a0software had essentially been a failure in terms of the body design but I had learnt a few things about the process.<\/p>\n<p>I&#8217;m now starting the process again having switched software to<a href=\"http:\/\/openfoam.org\/\"> OpenFOAM<\/a> this is open source (free) software most commonly run on <a href=\"http:\/\/en.wikipedia.org\/wiki\/Linux\">Linux<\/a>, however I&#8217;m not familiar with Linux and didn&#8217;t want deal with learning too much of that so I bought a setup ported to run on Windows from <a href=\"http:\/\/joomla.bluecape.com.pt\/index.php\">blueCAPE<\/a>. \u00c2\u00a0Which you can just install and have work out of the box. \u00c2\u00a0You can recompile the Linux version on to Windows yourself for free if you wish but for 50 odd Euro I couldn&#8217;t be bothered with the effort.<\/p>\n<p>From my previous efforts I&#8217;ve number of different body shapes to run through before I need to get into any real new design and learning how to get what I think are reasonable results from the simulation has taken a fair bit of time to date.<\/p>\n<p>Looking at the models I am running&#8230; \u00c2\u00a0The volume I am using is 20m long by 8m wide by 4m tall the basic mesh breaks this down into 100mm cubes, so that&#8217;s 640,000 cells right there, then when the model is introduced there&#8217;s a process of refinement to through a program call <a href=\"http:\/\/www.openfoam.org\/docs\/user\/snappyHexMesh.php\">snappyhexMes<\/a>h (part of openFOAM) which refines the mesh to fit the shape introduced into it. \u00c2\u00a0By the time this is done there&#8217;s generally about 7.5 million cells in the simulation.<\/p>\n<p>After quite a bit of experimentation and not being too happy with the results I came across <a href=\"http:\/\/www.beta-cae.gr\/events\/c3pdf\/232-1-lewis.pdf\">this<\/a> paper on the web, finding good advice for this type of problem seems quite hard, you have to be able convince yourself you are or are not looking at rubbish results coming out of the software and it&#8217;s easy to get rubbish results I know.<\/p>\n<p>So following the example in the paper I run the simulations now for 2500 iterations and take the last average of the last 500 iterations as the result.<\/p>\n<p>Thankfully I have constructed a fairly decent PC to runs the sims on (i7 2600k running at ~4.5GHz, 16Gb of ram). \u00c2\u00a0Each run typically takes about 13 hours to mesh and complete, which sounds slow but in practice is ok. \u00c2\u00a0Thankfully I have figured out how to run the problem in parallel so it makes full use of the cores available in the CPU otherwise this time would be about 5 times longer.<\/p>\n<p>Below is a video made using <a href=\"http:\/\/www.paraview.org\/\">ParaView<\/a> of one of the early runs, I believe visualization of whats going on in the simulation is a very important part of the process of trying to work out what to try next.<\/p>\n<p><iframe loading=\"lazy\" title=\"StreamLine02.avi\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/I3eMq0quJwo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>I&#8217;ll start posting some results and images as I get further into this.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\nI&#8217;ve started working on the design of the body more seriously than before. \u00c2\u00a0My previous attempts at using CFD\u00c2\u00a0software had&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/guerillamotive.com\/?p=197\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;June 17, 2012.  Body Design.  OpenFOAM CFD.&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":1,"featured_media":260,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-197","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-project-status","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/guerillamotive.com\/index.php?rest_route=\/wp\/v2\/posts\/197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guerillamotive.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guerillamotive.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guerillamotive.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guerillamotive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=197"}],"version-history":[{"count":6,"href":"https:\/\/guerillamotive.com\/index.php?rest_route=\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/guerillamotive.com\/index.php?rest_route=\/wp\/v2\/posts\/197\/revisions\/261"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/guerillamotive.com\/index.php?rest_route=\/wp\/v2\/media\/260"}],"wp:attachment":[{"href":"https:\/\/guerillamotive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guerillamotive.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guerillamotive.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}