<div dir="ltr"><div dir="ltr"><br>I am planning to run OpenFoam batch jobs, airfoil simulations, using gmsh for the meshing. For this I need to automate the creation of .geo files. It’s straightforward, following the Ingram tutorial<br><i><a href="https://community.dur.ac.uk/g.l.ingram/download/gmshtutorial2012.pdf">https://community.dur.ac.uk/g.l.ingram/download/gmshtutorial2012.pdf</a></i><br> until the final stage where one defines the “Physical Surfaces”<br>Physical Surface("back") = {1027};<br>presumably  a surface created by the previous “Extrude” command. As Ingram says: “Finding the number associated with a particular surface is a bit of a pain.” It seems he uses the gmsh GUI which is not available in my automated scenario.<br><br>The Octave code by César A. Vecchio Toloy gives some more detail:<br>fprintf (fid, 'j5[] = Extrude {0,0,%.10g} {Surface{5};Layers{1};Recombine;};\n', cuerda/10);<br>fprintf (fid, 'j6[] = Extrude {0,0,%.10g} {Surface{6};Layers{1};Recombine;};\n', cuerda/10);<br>followed by<br>fprintf (fid, 'Physical Surface("inlet") = {j5[5],j6[5]};\n');<br>But again it is not clear how to choose the correct components of j5 and j6.<br><br>Any help greatly appreciated.<br></div></div>