[rlug] Pipe/redirect

MOROIANU Dragos dmoroian at yahoo.com
Tue Jul 31 03:09:27 EEST 2018


 Excelent!Multumesc frumos!
Dragos

    On Monday, July 30, 2018, 10:50:08 AM PDT, Dumitru Ciobarcianu <dumitru.ciobarcianu at ines.ro> wrote:  
 
 On 30-Jul-18 19:52 PM, MOROIANU Dragos wrote:
>  Programul pe care vreau sa-l scriptez se numeste Xfoil (http://web.mit.edu/drela/Public/web/xfoil/) si care se comporta in mare masura la fel ca bc (accepta comenzi de la tastatura, face niste calcule si tipareste rezultatele pe ecran).Vreau sa-l folosesc pentru o problema de optimizare a unei forme geometrice, de aceea am nevoie de automatizare.Am cam renuntat la ideea de a-l comanda din bash, si am abordat problema cu ajutorul a 2 "named pipe" (unul pentru a trimite comenzi si al doilea pentru a primi rezultate), folosind standard C. Asa pot tine pipe-ul deschis cat doresc. Buffer-ul de la mine catre xfoil il golesc usor cu fflush, dar invers nu stiu daca pot comanda golirea. Sper ca asta sa nu-mi afecteze negativ interactiunea.

Ca să nu reinventezi roata, este posibil să te ajute:
https://github.com/Jvanrhijn/CXXfoil
"This library provides an easy-to-use C++ API for using Xfoil. It spawns
a child process, to which commands are written via a pipeline. A second
pipeline is used to read output from the process, which is logged to a
file."

De asemenea mie (biased, mă descurc mai bine în python decât în C) mi
s-a părut interesant și:
https://github.com/leal26/AeroPy
"AeroPy is an library for calculating aerodynamic properties. The main
feature of this library is the Python interface with XFOIL. The main
objective of this library is to be able to use XFOIL via Python
iteratively in a total of 4 lines total (one line for most uses).
Through this interface coupling with other softwares (Abaqus, Ansys,
etc) is possible and iterative processes (optimization, design
sensitivity) are possible. For a thorough explanation please check the
documentation and the tutorials."

Dumitru "Strong in this one, the google-fu is" C.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


_______________________________________________
RLUG mailing list
RLUG at lists.lug.ro
http://lists.lug.ro/mailman/listinfo/rlug_lists.lug.ro
  


More information about the RLUG mailing list