This is a root directory for mikelangelo/openfoam-driver Docker container that is meant to be deployed on Kubernetes. It contains following software:
- OpenFOAM installation
- NFS-client installation
- Demo scripts (in /mikelangelo direcotry)
You need to build the container, inject it on Kubernetes and then deploy it:
$ docker build -t mikelangelo/openfoam-driver .
$ docker save mikelangelo/openfoam-driver | docker exec -i kube-node-1 docker load
$ docker save mikelangelo/openfoam-driver | docker exec -i kube-node-2 docker load
Deploy it from project root:
$ kubectl create -f virtlet_deploy/openfoam-driver.yaml
Once the container is deployed on Kubernetes, please connect to it by using:
$ kubectl exec -it <POD_ID> -- /bin/bash
Following steps are then required in order to run SimpleFOAM simulation:
$ ./mount-case-dir.sh <NFS_IP>
$ ./download-example-data.sh
The first command above will mount NFS directory to container's /case
while the second command will
fill it with some simple OpenFOAM simulation data. Having the data in place, you can prepare it for the
actual simulation:
$ ./decompose.sh
Simulation is run on openfoam-worker OSv unikernels. Please read here for more information.
When OSv workers are done running the simulation, the result fragments need to be combined into a single final result. Use following command to do this:
$ ./reconstruct.sh
Viola! The final result waits for you in /case/100
directory.