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

How to access cell and parcel data in a heat transfer model?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 17, 2022, 04:27
Default How to access cell and parcel data in a heat transfer model?
  #1
New Member
 
Maksymilian Kurjata
Join Date: Jun 2019
Posts: 6
Rep Power: 7
m.kurjata is on a distinguished road
Hello everyone,


I'm trying to modify the RanzMarshall model to use a different Nusselt correlation in my simulations. In order to do that, I need to access field values of the cell that a parcel is in (e.g. density, cp, viscosity) and of the parcel itself (e.g. thermal conductivity kappa or the particle diameter). By default, RanzMarshall takes only Prandtl and Reynolds numbers as arguments, which are calculated somewhere else in the code. I'd like to know how can I access the above values to use them for my own Nu-correlation in RanzMarshall.C.


Something similar to what I need is done in drag models, like SphereDrag, for instance.



Code:
            //- Calculate the coupled force
            virtual forceSuSp calcCoupled
            (
                const typename CloudType::parcelType& p,
                const typename CloudType::parcelType::trackingData& td,
                const scalar dt,
                const scalar mass,
                const scalar Re,
                const scalar muc
            ) const;
Here, the viscosity muc of the fluid is accessed and the the "...parcelType& p" allows to access e.g. the particle diameter as p.d() in the SphereDrag.C file, if I understand it correctly.


I suppose muc can be used because of the "fvMesh& mesh" line in the SphereDragForce.H. Correct me if I'm wrong.


Code:
        

        //- Construct from mesh
        SphereDragForce
        (
            CloudType& owner,
            const fvMesh& mesh,
            const dictionary& dict
        );


Unfortunately, adding this line, "const fvMesh& mesh" to constructor of my newRanzMarshall files and adding "const typename CloudType:arcelType& p" to the Nu function result in errors, since I provide more arguments than are expected.


I would be grateful if you could help or refer me to a tutorial or some other material where similar things are done. I've been searching on the forum, google and in the tutorials for 2 days now with no effect.
m.kurjata is offline   Reply With Quote

Reply

Tags
field access, parcel variables, ranzmarshall


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
UDF in case with DPM modle POSTHU Fluent UDF and Scheme Programming 0 March 3, 2021 08:21
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 11 June 6, 2018 00:48
Particle tracking error alchem OpenFOAM Bugs 5 May 6, 2017 17:30
How to convert Lagrangian data to Cell data? harvee OpenFOAM Post-Processing 0 December 1, 2016 07:19
BrownianMotionForce in "reactingParcelFoam". parcel escaped from inlet and diverged. bijan darbari OpenFOAM Running, Solving & CFD 7 June 7, 2016 03:47


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