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

Access to Ubar_ in fvOption (Urgent Help)

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By ztnuaa
  • 1 Post By ztnuaa
  • 1 Post By ztnuaa
  • 1 Post By mostanad

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 7, 2020, 03:48
Default Access to protected Ubar_ in fvOption (Urgent Help)
  #1
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
Hi all,
I have a question about fvOption. I am using meanVelocityForce as the type of momentum source in my fvOption file. However, by looking the source file of this momentum type at OpenFOAM-5.x/src/fvOptions/sources/derived/meanVelocityForce, something seems hard to me.

https://github.com/OpenFOAM/OpenFOAM...ityForce.C#L89
We have a Ubar_ vector as a protected value which is read from fvOption file. Due to its protected type, it cannot be used at the outside of its class. So can anybody help me to just print its value (Info) at each timestep of my solver.
I think a solution is defining a public function at the class to print its value, and use this function at each time step in our solver coding (fvOptions.functionforUbar). But it has lots of c++ details.

Last edited by mostanad; November 7, 2020 at 10:46.
mostanad is offline   Reply With Quote

 


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
Is there a way to access the gradient limiter in Fluent ? CFDYourself FLUENT 1 February 16, 2016 05:49
How can I access to a volTensorField elements? urgent!!! adambarfi OpenFOAM Running, Solving & CFD 6 May 14, 2013 16:28
Urgent: Attempt to access un-allocated densityLe devesh.baghel STAR-CCM+ 0 July 19, 2011 02:44
Urgent! Access violation of UDF using VOF Rucy FLUENT 0 January 9, 2006 04:01
Error message!! plz help!! Urgent SAM FLUENT 2 February 1, 2005 12:11


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