CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

A question on interDyMFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2014, 12:55
Default A question on interDyMFoam
  #1
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I have a question to the following piece of code taken from interDyMFoam.C of OpenFOAM-2.2.x.

In the curly braces the variable Urel is declared and used inside the if-statement.

Where is Urel used in this solver?
It is neither passed to any method as an argument nor should it be accessible outside the block within the curly braces. So, of what use is Urel?


Code:
        scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();

        {
            // Calculate the relative velocity used to map the relative flux phi
            volVectorField Urel("Urel", U);

            if (mesh.moving())
            {
                Urel -= fvc::reconstruct(fvc::meshPhi(U));
            }

            // Do any mesh changes
            mesh.update();
        }

        if (mesh.changing())
        {
GerhardHolzinger is offline   Reply With Quote

Old   February 28, 2014, 14:28
Default
  #2
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
As the comment suggests, a relative flux field is calculated internally by dynamicRefineFvMesh for mapping purposes.
When the mesh changes, all fields in the registry (including the Urel field) are mapped auto-magically.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   March 1, 2014, 04:34
Default
  #3
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Hi, thanks for the answer.
What is still not clear to me is, where Urel is used. As it is declared within this block I assume it is not in use before this block.

To me it seems that Urel is nowhere used, but probably I am just confused.
GerhardHolzinger is offline   Reply With Quote

Old   March 4, 2015, 13:39
Default
  #4
Senior Member
 
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 434
Rep Power: 22
cnsidero is on a distinguished road
It's created simply for recomputing the fluxes on the newly refined mesh. In the dynamicMeshDict, under the correctFluxes entry you'll find a list of pairs. Those are mappings of the velocity fields to the fluxes. Since the flux phi is relative to mesh motion, it needs a relative velocity mapped to it. Since a relative velocity isn't stored anywhere else, it's computed where you point out. That's all Urel is used for.
cnsidero is offline   Reply With Quote

Reply


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
Capabilites of interDyMFoam kilroy OpenFOAM 2 April 29, 2013 12:29
small question about the functionalities of topological changes in OpenFoam ngj OpenFOAM Running, Solving & CFD 2 February 28, 2013 10:02
Question Re Engineering Data Source imnull ANSYS 0 March 5, 2012 13:51
internal field question - PitzDaily Case atareen64 OpenFOAM Running, Solving & CFD 2 January 26, 2011 15:26
Poisson Solver question Suresh Main CFD Forum 3 August 12, 2005 04:37


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