|
[Sponsors] |
April 4, 2018, 11:34 |
how to write / print function in OpenFOAM
|
#1 |
New Member
Mojtaba
Join Date: Apr 2016
Posts: 4
Rep Power: 10 |
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. |
|
April 5, 2018, 01:35 |
|
#2 |
Senior Member
Join Date: Mar 2018
Posts: 115
Rep Power: 8 |
What about:
Code:
Info << "The value of Kd is: " << kd() << endl; |
|
|
|
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 |