|
[Sponsors] |
|
March 8, 2021, 15:29 |
|
#1 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14 |
Maybe I am being stupid (I am tired), but I am struggling to see what your code is doing. First up, take this line:
Code:
if surfaceConvert rotor.stl rotor_scaled.stl -clean -scale 0.01 > /dev/null 2>&1 > log.surfaceConvert Code:
> /dev/null Also, as discussed, if you want to see the log file data from each time surfaceConvert is run, you want to change the line into something like the following: Code:
if surfaceConvert rotor.stl rotor_scaled.stl -clean -scale 0.01 >> log.surfaceConvert 2>&1 Code:
if ls; then echo "true"; else echo "false"; fi |
|
March 9, 2021, 13:46 |
|
#2 | |
New Member
Santi Parera
Join Date: Jul 2019
Location: BARCELONA
Posts: 25
Rep Power: 6 |
Quote:
Thank you so much, now it works well. One thing I do not understand is that if I navigate to the installation directory of OpenFOAM I can see that "surfaceConvert", "blockMesh" and "rotateMesh" are applications. Now why I have to execute blockMesh with "runApplication" and not with surfaceConvert?? This is the code I have now: Code:
#!/bin/sh cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions # - scaling cd constant/triSurface/ surfaceConvert ROTOR.stl ROTOR_SCALED.stl -clean -scale 0.01 >> log.surfaceConvert 2>&1 surfaceConvert TURBINA.stl TURBINA_SCALED.stl -clean -scale 0.01 >> log.surfaceConvert 2>&1 surfaceConvert REACTOR.stl REACTOR_SCALED.stl -clean -scale 0.01 >> log.surfaceConvert 2>&1 # - meshing cd ../.. cd system/ m4 blockMeshDict.m4 > blockMeshDict cd .. runApplication blockMesh >> log.blockMesh 2>&1 runApplication rotateMesh '(0 0 1)' '(0 1 0)' >> log.rotateMesh 2>&1 This also happens with "rotateMesh" |
||
March 9, 2021, 15:18 |
|
#3 | ||||
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14 |
Quote:
Quote:
Quote:
Code:
surfaceConvert ROTOR.stl ROTOR_SCALED.stl -clean -scale 0.01 >> log.surfaceConvert 2>&1 Code:
surfaceConvert ROTOR.stl ROTOR_SCALED.stl -clean -scale 0.01 > log.surfaceConvert 2>&1 Quote:
Code:
runApplication -overwrite blockMesh Good luck my friend! |
|||||
Tags |
allrun, directory, surfaceconvert |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hypersonic Sim (running at Mach 7): floating point exception has occurred | bungusbeefcake | STAR-CCM+ | 10 | March 31, 2015 06:59 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 18:56 |
Suse10 FoamX problem | frank178 | OpenFOAM Installation | 6 | January 14, 2010 04:18 |
Statically Compiling OpenFOAM Issues | herzfeldd | OpenFOAM Installation | 21 | January 6, 2009 09:38 |
Kubuntu uses dash breaks All scripts in tutorials | platopus | OpenFOAM Bugs | 8 | April 15, 2008 07:52 |