Re: Airfoil simulations - A little contribution for meshing
Posted: Fri Dec 05, 2025 8:56 pm
So, yeah... 6 years later, but if you still need an answer: I think you're inserting a space between the function name (foilgmsh) and the parameters, so Octave is reading it as two separate expressions. I.e.:someguy wrote: Tue Jun 18, 2019 4:21 am I cannot get this utility to work, either from the command line or from within octave. It seems like it doesn't like the parameter list. What am I missing ?
$ uname -a
Linux Brix 5.1.8-300.fc30.x86_64 #1 SMP Sun Jun 9 17:09:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ octave
GNU Octave, version 4.4.1
...
Octave was configured for "x86_64-redhat-linux-gnu".
$ foilgmsh ('n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01)
bash: syntax error near unexpected token `'n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01'
$ octave foilgmsh ('n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01)
bash: syntax error near unexpected token `('
When you state "1) Download the foilgmsh.m script and place it in a directory inside the path of Octave/MatLab", where are you referring to ?
"2) To check if it's accesible, type from within Octave:"
you mean:
octave:1> help foilgmsh
'foilgmsh' is a function from the file /home/me/Downloads/OpenFOAM/Chapter 5 Beginners Tutorial/foilgmsh.m
foilgmsh(archi,alfa,yplus,eter,Re,M,T0,N,bump) ...
but yet...
$ octave --eval foilgmsh.m ('n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01)
bash: syntax error near unexpected token `('
Or
$ octave "foilgmsh ('n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01)"error: no such file, '/home/me/Downloads/OpenFOAM/.../foilgmsh ('n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01)'
error: source: error sourcing file '/home/me/Downloads/OpenFOAM/.../foilgmsh ('n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01)'
Thank you for contributing this utility !
foilgmsh ('n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01) INCORRECT
foilgmsh('n23012.dat',7.5,50,'a',3000000,0.3,198.16,[100,40,25,15],0.01) CORRECT
Hope this helps, and sorry for the delay. I stopped doing sims until recently, so I wasn't checking the forums and never got a notification for your message.