|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Subodh
Join Date: Sep 2013
Location: Canada
Posts: 29
Rep Power: 14 ![]() |
Hi,
OpenFoam Version 8 (year 2020) has a tutorial file for planing hull in multiphase RAS folder. I am wondering if anyone had a chance to run it. I am able to run it but when I try to investigate the codes, I am lost and finding it difficult to understand what is actually happening. So I am trying my luck here to see if any expert here had a chance to explore the planing hull tutorial and can give me some guidelines to what is happening within the codes. Thanks in advance! |
|
|
|
|
|
|
|
|
#3 | |
|
New Member
Subodh
Join Date: Sep 2013
Location: Canada
Posts: 29
Rep Power: 14 ![]() |
Quote:
Thanks for the reply. Yes the Allrun script, I am familiar with C++ programming but a beginner in bash, so looking for some explanation on the flow of Allrun script. Thanks! |
||
|
|
|
||
|
|
|
#4 | |
|
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,716
Blog Entries: 6
Rep Power: 53 ![]() ![]() ![]() |
Hey, so I won´t say that but shame on you :P
If you are familiar with c++ the bash script should be just simple. Code:
#!/bin/sh Code:
usage () {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat <<USAGE
Usage: ${0##*/} [OPTIONS]
Options:
-i | -interface no refinment in vertical direction of the mesh
-l | -local mesh with local refinment
-h | -help help
Ship hull simulation to demonstrate two different meshing strategies that can be
used with PLIC type schemes.
USAGE
exit 1
}
Code:
~: ./Allrun -i ~: ./Allrun -l ~: ./Allrun -h Code:
meshType=0
# OPTIONS
while [ "$#" -gt 0 ]
do
case "$1" in
-i | -interface)
meshType=1
break
;;
-l | -local)
meshType=2
break
;;
-h | -help)
usage
;;
-test)
shift
;;
-*)
usage "Invalid option '$1'"
;;
*)
usage "Invalid option '$1'"
break
;;
esac
done
Code:
# Run from this directory
cd "${0%/*}" || exit 1
# Source tutorial run functions
. "$WM_PROJECT_DIR/bin/tools/RunFunctions"
Code:
if [ $meshType -eq 0 ] || [ $meshType -eq 1 ]; then
{
./Allmesh.1
}
elif [$meshType -eq 2 ]; then
{
./Allmesh.2
}
fi
Code:
runApplication setFields runApplication decomposePar runParallel $(getApplication) runApplication reconstructPar Quote:
- okay. bash is sometimes a bit wired to read but, hey, you seem to be a programmer so its common that things look strange ![]() Hope this was enough information and I was just kidding with the shame on you sentence
__________________
Keep foaming, Tobias Holzmann Last edited by Tobi; June 8, 2021 at 15:30. |
||
|
|
|
||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Other] Tabulated thermophysicalProperties library | chriss85 | OpenFOAM Community Contributions | 62 | October 2, 2022 04:50 |
| [Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
| SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |
| Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
| OpenFOAM 1.6.x - CentOS 5.3 x86_64 | linnemann | OpenFOAM Installation | 68 | April 22, 2013 12:03 |