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

how to write / print function in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2018, 11:34
Default how to write / print function in OpenFOAM
  #1
New Member
 
Mojtaba
Join Date: Apr 2016
Posts: 4
Rep Power: 10
M.Fard is on a distinguished road
Hi guys,

I am working with twoPhaseEulerFoam solver. I would like to monitor (write/print) a function kd() which is defined as:

tmp<volScalarField> Kd() const;

this function is located in twoPhaseSystem directory. This function returns a drag coefficient. Moreover, it is defined as:
Foam::tmp<Foam::volScalarField> Foam::twoPhaseSystem::Kd() const
{
return drag_->K();
}

I would like to monitor kd(). I tested some ways, but it does not work. Would it be possible to give me some guide?

Best regards,
Mojtaba.
M.Fard is offline   Reply With Quote

Old   April 5, 2018, 01:35
Default
  #2
Senior Member
 
Join Date: Mar 2018
Posts: 115
Rep Power: 8
anon_q is on a distinguished road
What about:
Code:
Info << "The value of Kd is: " << kd() << endl;
?
anon_q 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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 11:32
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 14:24
[snappyHexMesh] How to define to right point for locationInMesh Mirage12 OpenFOAM Meshing & Mesh Conversion 7 March 13, 2016 14:07
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 10:20


All times are GMT -4. The time now is 17:56.