CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

OpenFOAM Screencast - How to program with OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree9Likes
  • 7 Post By Tobi
  • 1 Post By nsf
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Display Modes
Old   March 19, 2017, 06:40
Default OpenFOAM Screencast - How to program with OpenFOAM
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,706
Blog Entries: 6
Rep Power: 31
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hello everybody,

based on the survey I made on my website, the wish of the community was to create a new session of screencasts that show how to program in OpenFOAM. Therefore, I started to create new videos which can be checked out in the link below. During the screencasts I am trying to talk about the following things:

  • Recommended system set-up for development (not necessary but very useful)
  • Creating a new solver (cavitatingFoam into boilingFoam)
    • Preparing the new solver
    • Analyzing the files/structure of the solver
    • Talking about different objects and the usage of Doxygen
    • Changing the corresponding solver in order to simulate boiling
  • Set-up of a simple test case
  • Talking about gdb and the usage


The videos can be found here: Screencasts about programming in OpenFOAM
nsf, Traction, floquation and 4 others like this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 20, 2017, 15:54
Default
  #2
nsf
Senior Member
 
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 118
Rep Power: 11
nsf is on a distinguished road
Hi Tobi,

Yet another great screen cast. Really good work!

I'm sure you had a good reason to copy OpenFOAM-dev and ThirdParty-dev to a separate folder for the debug version. For others who are starting programming with OpenFOAM:
You can also just set the environment variable WM_COMPILE_OPTION as an argument to etc/bascrc.

I've set two aliases in my $HOME/.bashrc like so:

Code:
OFINSTDIR=/path/to/somehere/OpenFOAM
alias ofdbg=". $OFINSTDIR/OpenFOAM-dev/etc/bashrc WM_COMPILE_OPTION=Debug"
alias of=". $OFINSTDIR/OpenFOAM-dev/etc/bashrc"
In order to compile the debug version I just have to run the alias "ofdbg", i.e.
Code:
ofdbg
cd $WM_PROJECT_DIR
./Allwmake
If everything is correctly setup, things should run smoothly. OpenFOAM doesn't overwrite anything. The debug version of the compiled libraries are found under $WM_PROJECT_DIR/platforms/*Debug

Keep up the good work Tobi!

P.s
I really like QtCreator, it's got a built in debugger and has smart auto-completion. Here's how to set it up for OpenFOAM
https://openfoamwiki.net/index.php/H...with_QtCreator
Tobi likes this.
nsf is offline   Reply With Quote

Old   March 20, 2017, 17:13
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,706
Blog Entries: 6
Rep Power: 31
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Great. I will mention your stuff in the next screencast or will add another inbetween. You are right, I just wanted to keep everything separated

Thank you for the hint and your Feedback.

Sent from my HTC One mini using CFD Online Forum mobile app
nsf likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Tags
doxygen, gdb, holzmann cfd, openfoam programming, tobias holzmann

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM Training Beijing 22-26 Aug 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 May 3, 2016 04:57
which program is suitable for showing different graphs into one to compare? immortality OpenFOAM Post-Processing 4 April 26, 2013 22:22
Call Fortran program from OpenFoam tsjb00 OpenFOAM Running, Solving & CFD 6 April 22, 2013 15:26
2D Mesh Generation Tutorial for GMSH aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07


All times are GMT -4. The time now is 23:31.