Day 11

From OpenFOAM Wiki
Jump to navigation Jump to search

Welcome to Day 11. By now you should be able to run simulations of real life problems with OpenFOAM. In some cases models might not be implemented in the source code. OpenFOAM offers through an open source code the possibility to add models to the existing code. This might be a challenging task, but with the following tutorials, you will get a basic understanding of the work flow. Today we will focus on:

  • taking exiting code as a starting point
  • required changes
  • compiling custom solvers

Go back to "3 weeks" series.

Programming - Introduction

This short introduction and example is an excellent start into programming in OpenFOAM. You will quickly learn the steps and the idea behind compiling your own code. Here the focus is on:

  • commands required
  • compilation
  • output
  • using exiting code as a starting point

Developing an OpenFOAM solver

This tutorial gives a compact introduction to developing a solver with not only an additional model but actually an additional partial differential equation, which is being solved during run time. Here the focus is on:

  • solver structure
  • compiling
  • existing solvers
  • adding an energy equation
  • modifying and running a case

Programming in OpenFOAM

This video lets all the gained information sink in. With it you will be able to understand the simulations you ran up until now and you will implement this knowledge in upcoming cases. You will learn about

  • organizing your work
  • creating your own application
  • adding a boundary condition
  • programming guidelines
  • consistent styling
  • debugging

Scalar Transport: Swirl Test

With your gained experience you will create a new solver here for a different application and test it with a modified case setup. The focus is on:

  • types of source files
  • applications
  • utilities
  • build system
  • modifying a case setup

Programming - Implementing boundary condtions using codeStream

In this tutorial we cover how to custom implement boundary conditions using codeStream.

Programming - Field initialization using codeStream

In this tutorial we cover further steps how to implement custom boundary conditions using codeStream.

Programming - Creating a basic solver from scratch

In this tutorial we cover how to implement a basic solver from scratch.

Programming - Adding a passive scalar to icoFoam

In this tutorial (and using as starting point the previous tutorial), we cover how to add a passive scalar to icoFoam.

End of Day 11

This is the end of Day 11. Today you got a basic introduction into programming in OpenFOAM. We hope, that you had fun and you will still come back tomorrow for more programming. See you tomorrow!