Giter Site home page Giter Site logo

jcmendezcarvajal / openfoam-workflow-vscode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jakobhaervig/openfoam-docker-vscode-workflow

0.0 1.0 0.0 15.01 MB

This repo shows how I personally work with OpenFOAM through Docker and Visual Studio Code. Using Visual Studio Code as text editor has a number of advantages as it allows you to attach the file system of a running Docker container, which makes accessing an OpenFOAM/Docker installation much easier. Also, Visual Studio Code has extensions for OpenFOAM syntax highlighting.

openfoam-workflow-vscode's Introduction

Visual Studio Code workflow for OpenFOAM with Docker

Repository describing my favourite workflow combining Visual Studio Code, OpenFOAM and Docker. Make sure to first follow the guide at https://github.com/jakobhaervig/openfoam-dockerfiles before continuing with this guide.

1. Install Visual Studio Code

First, install the text editor Visual Studio Code.

2. Install extensions

Install the following extensions, which will help our OpenFOAM workflow:

  1. Docker
  2. Remote - Containers
  3. OpenFOAM

3. Associate OpenFOAM-specific files to enable syntax highlighting

4. Start Docker container

First, make sure Docker is running and you have a Docker image avialable with your OpenFOAM installation. I have a created a guide github.com/jakobhaervig/openfoam-dockerfiles, which will guide you through the process if in doubt.

Next, start a terminal in VS Code and run the following command to start a Docker container:

docker container run -ti --rm -v $HOME/openfoam-data:/data -w /data openfoam:v2106

5. Attach Visual Studio Code to the running Docker container

Attach Visual Studio Code to the running Docker container. This enables us to access the file system within the container directly in VS Code.

6. Open a folder to access the file system within the Docker container

From within the newly opened window open a folder at root / to gain full access to the file system of the Docker container.

7. Open a terminal from within the Docker container

Open a new terminal within the Docker container and test if OpenFOAM is sourced correctly:

simpleFoam -help

openfoam-workflow-vscode's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.