CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Run a simulation from Windows 10 (https://www.cfd-online.com/Forums/openfoam-solving/220912-run-simulation-windows-10-a.html)

Chia September 26, 2019 11:01

Run a simulation from Windows 10
 
Dear All,


for a project I am currently working on, I would need to start a simulation in OF from Windows 10.
I installed OF using Ubuntu for Windows 10, following this link https://www.youtube.com/watch?v=xj0dB_PsElg. OF is running without problems when I start simulations from the Ubuntu terminal, but I would need to be able to start a simulation from the cmd.exe terminal, i.e. using something like
Code:

bash -c "blockMesh"
If I just type the code above I get the error
Code:

/bin/bash: blockMesh: command not found
Does anybody know if this is possible at all? If yes, do you know the right commands?

Cheers,
Chiara

CFD_10 September 26, 2019 11:07

Try the following
Code:

bash -c "source /path/to/OpenFOAM/etc/bashrc; blockMesh"
For example if OpenFOAM is installed on /opt/openfoam6 then, the command above becomes:
Code:

bash -c "source /opt/openfoam6/etc/bashrc; blockMesh"

Chia September 27, 2019 05:55

It worked! Thanks a lot!
I could even run the Allrun scripts in this way, that is exactly what I needed :-)


All times are GMT -4. The time now is 08:28.