CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

main()-execution and object creation within

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

LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2020, 05:59
Default main()-execution and object creation within
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 240
Rep Power: 5
geth03 is on a distinguished road

from my understanding if i want to create an object from a class i do the following:
classname objectname;
afterwards i can access the member functions of this class:;

when running a solver the main-function is executed.
however, within the main-function i don't see where the object of the pimple solver is created. i just see for example (reactingMultiphaseEulerFoam.C):

// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())

#include "YEqns.H"

if (faceMomentum)
#include "pUf/UEqns.H"
#include "EEqns.H"
#include "pUf/pEqn.H"
#include "pU/UEqns.H"
#include "EEqns.H"
#include "pU/pEqn.H"


if (pimple.turbCorr())

can anybody please explain how the object fluid or pimple is created? are those created in the header files and imported with #include? if yes, where is the code part that generates those objects automatically and gives these objects its names.
also,i don't understand how functions are executed only by including some header files.
do these header files contains certain code that are executed automatically?

thanks in advance.
geth03 is offline   Reply With Quote


programming, solver

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
[snappyHexMesh] Placing an object on top of the NACA0012 airfoil shape najimaddin96 OpenFOAM Meshing & Mesh Conversion 0 March 21, 2020 22:53
Is the full text of an IOdictionary stored in RAM for the life of the object? knuckles OpenFOAM Programming & Development 0 November 3, 2015 11:46
Problem Execution Control ICEM-CFX cote2714 CFX 5 September 10, 2015 13:03
[waves2Foam] floating object inside the flume tutorial with interDyMFoam Rising Star OpenFOAM Community Contributions 2 April 20, 2015 23:42
Problems with the execution of the setFields utility. foamer OpenFOAM Pre-Processing 5 June 3, 2013 12:24

All times are GMT -4. The time now is 12:34.