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

want to create volscalarField Object using just runTime Objects.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2015, 18:44
Default want to create volscalarField Object using just runTime Objects.
  #1
Member
 
Join Date: Oct 2013
Posts: 92
Rep Power: 13
fedvasu is on a distinguished road
Here is how we typically define, volScalarField Objects

Code:
 mu_
    (
        IOobject
        (
            phasePropertyName("thermo:mu"),
            mesh.time().timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionSet(1, -1, -1, 0, 0)
    )
but we don't require mesh object to create IOobject, we may use runTime object of type Time,
Code:
 mu_
    (
        IOobject
        (
            phasePropertyName("thermo:mu"),
            runTime.timeName(),
            runTime,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionSet(1, -1, -1, 0, 0)
    )
I want to know if we can forgo mesh object, in the next argument or maybe we can create an object of subtype of fvMesh class? something like this,

Code:
 mu_
    (
        IOobject
        (
            phasePropertyName("thermo:mu"),
            runTime.timeName(),
            runTime,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        GeoMesh<runTime>,
        dimensionSet(1, -1, -1, 0, 0)
    )
is it possible? have you trued it before, my constraint is I don't have an object of type fvMesh readily available.
fedvasu is offline   Reply With Quote

Old   August 4, 2016, 15:06
Default
  #2
Member
 
Join Date: Oct 2013
Posts: 92
Rep Power: 13
fedvasu is on a distinguished road
Yes it is possible.

It is exactly as I have written.

runTime and mesh are derived from the same base class.
fedvasu is offline   Reply With Quote

Reply

Tags
constructor, fvmesh, volscalarfield


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
How to create initiate a volScalarField p without reading from disk NO_READ does not seem to work dbxmcf OpenFOAM Running, Solving & CFD 14 March 25, 2022 07:08
Meshing a Sphere Ajay FLUENT 10 September 3, 2016 15:18
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 02:07
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


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