CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Lounge

Cygwin remote command using batch file on Windows

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 20, 2015, 10:04
Default Cygwin remote command using batch file on Windows
  #1
New Member
 
maxime
Join Date: Jul 2015
Posts: 8
Rep Power: 11
maxou1993 is on a distinguished road
Hi,
I would like to automate OpenFOAM simulations because I have to model the motion of 3 spheres in a fluid in a cuboid. So as to do that, I want to use Matlab.
My strategy is to create a programm using a loop with 6 stages for each of them :
1) Launch cygwin (because I have to use a Windows OpenFOAM version using the cygwin emulator)
2) Access the snappyHexMesh file to set up the geometry using the new position of my spheres using a Matlab script (that I created, and who gives new positions of the sphere using the former position and the forces given by using sample on OpenFOAM)
3) Modify the snappyexMesh
4) Launch simpleFoam
5) Store the steady state file containing U, p etc...
6) Calculate the new position using my Matlab script.

But I have a first problem : i manage to automatically open the cygwin window but furthermore I need to access my snappyhexmeshdict repertory in the cygwin window (so as to be then able to modify snappyhexmesh) automatically .
Here is what I wrote in the window cmd of Windows :
C:\\OpenFOAM\\cygwin64\\bin\\mintty.exe "D:/Users/.../command.sh"
In command.sh I just wrote cd test/...
So for the moment, I just want to automatically launch cygwin and to be in the case directory written in the batch file but I don't manage to do it.
I have been dealing with it for 2 days but I didn't know which informations were relevant for my case. So, that's why I created this thread and I would be grateful if a foamer could help me.
Thanks.
maxou1993 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 16:14
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 14:12.