|
[Sponsors] |
January 31, 2020, 10:02 |
Shell Script - Calling latestTime directory
|
#1 |
Member
Conor Crickmore
Join Date: Jan 2020
Location: Leicestershire, United Kingdom
Posts: 36
Rep Power: 6 |
Hey CFD-Online,
I've been using the forum here as a source of info for a long time now but have only just had the need to post, so please be gentle! I've searched around a bit for an answer, but had no luck, possibly because I'm not entirely sure how to word my question at a length Google would fine usable. Basically, I am writing some ./Allrun scripts to help automate some snappyHexMesh iterations, and have run into an issue. I understand that snappy builds its mesh over three time-steps, based on controlDict, and that you can overwrite your existing polyMesh (as opposed to having three new time directories) by using the -overwrite argument, however, I haven't been able to get -overwrite to function as expected when parallelising snappy using mpirun and reconstructing. So my question is twofold, am I doing something wrong when it comes to parallel -overwrite, and if not, is there a way I can call the latestTime directory in a shell script in order to overwrite polyMesh in '0' manually? Thanks for your help!
__________________
Conor Crickmore PhD Researcher in Automotive Aerodynamics Aeronautical and Automotive Engineering Loughborough University LE11 3TU |
|
February 1, 2020, 10:55 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 |
I am not sure why the overwrite wouldn't work in tandem with parallel snappy use, but I've not used it in parallel much. I can help with the latest time, though -- I've used the following in a script in which I identify the final time :
Code:
finalTime=$(foamListTimes | tail -1) |
|
February 3, 2020, 11:28 |
|
#3 | |
Member
Conor Crickmore
Join Date: Jan 2020
Location: Leicestershire, United Kingdom
Posts: 36
Rep Power: 6 |
Quote:
Thanks clapointe! I'm still not sure why -overwrite wasn't working as expected, it didn't throw an error, and still seemed to overwrite the 0 directory (as opposed to making 1-3) but the final result was seemingly the original block mesh (not the final snappy mesh) Your recommendation for the time directory worked like a treat though! For clarity however, it turns out you can use: Code:
$(foamListTimes -latestTime) Thanks again for your help
__________________
Conor Crickmore PhD Researcher in Automotive Aerodynamics Aeronautical and Automotive Engineering Loughborough University LE11 3TU |
||
Tags |
bash script, snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CGNS] CGNS converters available | mbeaudoin | OpenFOAM Meshing & Mesh Conversion | 137 | December 14, 2018 05:20 |
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' | mfiandor | OpenFOAM Installation | 2 | January 25, 2010 10:50 |
Statically Compiling OpenFOAM Issues | herzfeldd | OpenFOAM Installation | 21 | January 6, 2009 10:38 |
Compiling OpenFOAM13 on AMD64 with Redhat Enterprise | mbeaudoin | OpenFOAM Installation | 20 | June 17, 2008 07:43 |
Gerris software installation | mer | Main CFD Forum | 2 | November 12, 2005 09:50 |