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

MotionSolver functions openFoam 2.3

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

LinkBack Thread Tools Display Modes
Old   July 4, 2017, 09:19
Default MotionSolver functions openFoam 2.3
Join Date: Jun 2010
Posts: 37
Rep Power: 9
bullmut is on a distinguished road
Sponsored Links
Good Day

I am trying to follow the code for a surfaceDiscplament motion.
To that end i am following the print out call for a single time step from the solver moveDynamicMesh. I am finally at the point where i tracing the steps of the function call
line 136 in moveDynamicMesh.C
Please bear with me...
This calls the dynamicMotionSolverFvMesh base class which inherits from the dynamicFvMesh class. The function update in this class actually calls the fvMesh class function movePoints
bool Foam::dynamicMotionSolverFvMesh::update()

    if (foundObject<volVectorField>("U"))
        volVectorField& U =

    return true;
But before the fvMesh function can be implemented we need to motionSolver pointer to execute the function newPoints.The motionSolver class is a virtual base class that is used to build specific forms of motion. In this case i am looking at displacementMotionsolver. So now i am looking at the base class motionSolver and the virtual function newPoints exists:
Foam::tmp<Foam::pointField> Foam::motionSolver::newPoints()
    return curPoints();
Now it is not directly replaced by a displacementMotionsolver function however there is a solve() function in the class that inherits from displacementMotionsolver, namely displacementLaplacianFvMotionsolver. Which is ultimately the motion solver i am implementing.
My question is do i assume the final motion solver (displacementLaplacianFvMotionsolver) is being called to execute solve() in which case the code reads:
void Foam::displacementLaplacianFvMotionSolver::solve()
    // The points have moved so before interpolation update
    // the motionSolver accordingly


which makes little sense to me or do i assume it is the solve function as defined by the base virtual class motionSolver as below:
//- Solve for motion
        virtual void solve() = 0;
In which case the code skips the 3rd code block i posted would just jump straight to the function curPoints.
Any help is greatly appreciated and thank you for even reading this lengthy post
bullmut is offline   Reply With Quote
Sponsored Links


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 Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 07:15
cantera integration with openfoam 2.3 khalifa OpenFOAM Running, Solving & CFD 1 November 4, 2016 17:34
A Mac OS X of23x Development Environment Using Docker rt08 OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 1 February 28, 2016 20:00
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 OpenFOAM Announcements from Other Sources 0 January 5, 2016 04:18
Working with distribution functions in OpenFOAM Aleksey_R OpenFOAM 0 November 5, 2013 11:08

Sponsored Links

All times are GMT -4. The time now is 00:42.