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

[Tutorials] OpenFOAM programming tutorials for beginners

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

Like Tree141Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2018, 02:29
Default
  #41
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 247
Blog Entries: 1
Rep Power: 15
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Quote:
Originally Posted by Artur View Post
Hi All,

Just wanted to say I (finally) upgraded all of the tutorials to work with OpenFOAM 5.x. Sorry it took so long, but they're here now. I also added a new tutorial showing how to deal with parsing command line arguments and options, following up on some questions asked in this thread a while ago.

Artur
Great job Arthur! Was looking for command line arguments, which I did long time before, and found perfect instructions here!)

Cheers,
Alex
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   June 7, 2018, 08:59
Default
  #42
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 350
Rep Power: 16
Artur will become famous soon enough
Hi All,


Just wanted to say I added a new tutorial looking at the nuts and bolts of mesh generation. I wanted to get a glimpse of that part of OF myself in line with my recent side project of learning to use Engrid and though it might be interesting to some of you as well. If you're interested in what I've been up to with Engrid check out this post:
Primsatic boundary layer creation fixed


All the best,


Artur
makaveli_lcf likes this.
Artur is offline   Reply With Quote

Old   July 8, 2018, 11:42
Default
  #43
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 350
Rep Power: 16
Artur will become famous soon enough
Hi All,


Just wanted to say I added a brief new tutorial on writing custom momentum sources based on an actuator disk example.


All the best,


Artur
makaveli_lcf likes this.
Artur is offline   Reply With Quote

Old   July 10, 2018, 14:48
Default
  #44
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 350
Rep Power: 16
Artur will become famous soon enough
Dear All,


Apologies for spamming the thread again the same week, but I just realised a new version of OpenFOAM has been released, so we're now at 6 from the openfoam.org branch. I tested the tutorials and they all seem to work fine without any modifications. I also restructured them a bit to make it easier for me to test them automatically in the future.


All the best


Artur
Artur is offline   Reply With Quote

Old   March 8, 2019, 15:04
Default
  #45
New Member
 
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 4
Rep Power: 6
febriyan91 is on a distinguished road
Quote:
Originally Posted by Artur View Post
Hi Foamers!

I wanted to share with you a couple of simple pieces of codes I wrote to demonstrate basic OpenFOAM functionality to beginner C++ programmers:
https://github.com/UnnamedMoose/Basi...mmingTutorials

The reason for the existence of these is that during my time at a University I've found that many students starting their research using OpenFOAM are required to develop code for it but have little to no prior knowledge of C++. This usually makes it very hard for them to jump from basic programming to the admittedly complex OpenFOAM framework, and also makes using many on-line materials quite challenging. The above tutorials hope to help with making this step. I've "tested" them on a few of my colleagues and collaborators and I hope they may help a wider audience in the future.

Feedback always welcome! But please bear in mind I'm self-taught both in OpenFOAM and C++, so go easy on me

Also, if you'd like to contribute a new tutorial or offer improvements to the ones already there, I'd highly welcome your input!

Happy foaming,

Artur
Thank you so much for sharing!
febriyan91 is offline   Reply With Quote

Old   July 9, 2019, 02:27
Default
  #46
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 350
Rep Power: 16
Artur will become famous soon enough
Hi All,


Just a quick update: I've upgraded the tutorials to work with the new OpenFOAM 7. Changes required were minimal but at least now everything works out-of-the-box.


Happy foaming,


A
snak, WaterHammer1985 and Tesbo like this.
Artur is offline   Reply With Quote

Old   August 30, 2019, 05:52
Default ThankYou
  #47
Member
 
Arthur
Join Date: Aug 2014
Location: Italy
Posts: 39
Rep Power: 7
Artur.Ant is on a distinguished road
Thank you very much. Appreciate a lot your work. It was a good idea to make some tutorials for the new c++ users.
Artur.Ant is offline   Reply With Quote

Old   September 2, 2019, 13:20
Default Thank you
  #48
New Member
 
Alex
Join Date: Sep 2019
Posts: 1
Rep Power: 0
Zywx is on a distinguished road
Thank you for your job, I'm new in this world and I'm learning a lot with your posts.
I have OF7 and I have an error in all the tutorials and I dont know why.




tutorial1

Quote:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM FATAL ERROR:
cannot find file "/home/alexp/OpenFOAM/alexp-7/BasicOpenFOAMProgrammingTutorials-master/OFtutorial01_inputOutput/testCase/controlDict"

From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::rea dStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const
in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 538.

FOAM exiting

In the tutorial2

Quote:
./Allrun: línea 3: 18058 segmentation fault (core dumped) openfoam ofTutorial2 someWordIPassed 5. -someSwitch -someInt 2 -dict path_to_nowhere_in_particular

./testAll

Quote:
Checking: OFtutorial00_helloWorld/
PASS: ./Allwmake
FAIL: ./Allrun
Checking: OFtutorial01_inputOutput/
PASS: ./Allwmake
FAIL: ./Allrun
Checking: OFtutorial02_commandLineArgumentsAndOptions/
PASS: ./Allwmake
FAIL: ./Allrun
Checking: OFtutorial03_understandingTheMesh/
PASS: ./Allwmake
FAIL: ./Allrun
Checking: OFtutorial04_basicFieldOperations/

I feel bad for being the only one to have this problem.
Zywx is offline   Reply With Quote

Old   September 3, 2019, 03:30
Default
  #49
Senior Member
 
Artur's Avatar
 
Artur
Join Date: May 2013
Location: Southampton, UK
Posts: 350
Rep Power: 16
Artur will become famous soon enough
Hi,

From the first error message, it seems as though the test case is missing the controlDict file. Are you sure it checked out properly and contains the usual OpenFOAM folder structure?

Regards,

Artur
Artur is offline   Reply With Quote

Old   May 18, 2020, 19:40
Default
  #50
New Member
 
Kumar Pushpak
Join Date: Apr 2019
Posts: 2
Rep Power: 0
khool_chelsea is on a distinguished road
Hey thanks. This was just what i needed to get started.
Artur likes this.
khool_chelsea is offline   Reply With Quote

Reply

Tags
turorial files, tutorial

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 05:40
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 9 March 30, 2017 05:19
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 14, 2016 10:19
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 03:18
Openfoam Programming from scratch shovan OpenFOAM Programming & Development 1 July 9, 2015 12:38


All times are GMT -4. The time now is 19:28.