Problem with these instructions? Please send a CFDDFC Support Query.

Running on an Instance

Once the instance launches, the user run the following subcommands to manage data in cfddfc.

  • push: transfer OpenFOAM case files from the local machine to the remote instance.
  • pull: transfer OpenFOAM case files from the remote instance to the local machine.
  • files: list case files on the remote instance.

The following subcommands enable the user to run OpenFOAM applications and scripts etc on a remote instance.

  • login: login to the remote instance and run OpenFOAM applications, scripts, etc.
  • run: run OpenFOAM applications, scripts, etc without logging in to the remote instance.
  • desktop: launch a remote desktop on the instance.

Example: Running the pitzDaily Case

The user can run the pitzDaily example described in “Launching an Instance” as follows.  First the user can transfer the case to the remote instance with

cfddfc push

The user is prompted to create a new case directory and to transfer the data.  Type “y” to confirm.  The user can then login to the remote instance with the following command.

cfddfc login

At the prompt on the remote machine, they can change directory to pitzDaily, run the example case as normal, and then logout from the remote instance, e.g.

cd pitzDaily
blockMesh
simpleFoam
exit

The user can then transfer the data back from the remote instance to their local machine with the following command.

cfddfc pull

The user can then post-process data on their local machine.  If the user wished to delete the time directories, containing their simulation results, on the remote machine (using “foamListTimes -rm) they could execute the command remotely with run as follows.

cfddfc run "foamListTimes -rm"

The user could then list the files on the remote instance to confirm the deletion of the time directories with the following command.

cfddfc files

The user could then re-run simpleFoam without logging into the remote instance with:

cfddfc run simpleFoam

The script warns the user that the files on the local machine and remote instance are not synchronised.  The user should ignore the warning and type “y” to confirm they wish to continue.

If their system is configured with the optional pyhoca package, the user can login to the instance via a remote desktop with the following command.

cfddfc desktop

The user can then perform tasks requiring a graphical interface, e.g. post-processing with ParaView.

Next Step (optional) → Launch a Cluster