CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Search Results

Register Blogs Community New Posts Updated Threads Search

Showing results 1 to 5 of 5
Search took 0.00 seconds.
Search: Posts Made By: nuovodna
Forum: OpenFOAM October 4, 2010, 08:55
Replies: 19
Views: 3,827
Posted By nuovodna
adding lines

Add these lines before the int main on solver .C file:

#include "OFstream.H"
#include <fstream>
#include <sstream>
#include <string>

and modify the

mesh.V()[cellii]
Forum: OpenFOAM October 4, 2010, 08:34
Replies: 19
Views: 3,827
Posted By nuovodna
recompile the solver

In createFields.H put these lines at the top

dimensionedScalar Q
(
"Q",
dimensionSet(1,-3,0,0,0), // adjust the dimension here!!!
0.0
);

Then you have...
Forum: OpenFOAM October 4, 2010, 08:21
Replies: 19
Views: 3,827
Posted By nuovodna
text file

The solver should have written a file named massIntegral.dat in your case directory. The file contains the values of Q at corresponding values of time

Regards

Emanuele
Forum: OpenFOAM October 4, 2010, 06:37
Replies: 19
Views: 3,827
Posted By nuovodna
Hi, you can bypass paraview in this way Add...

Hi, you can bypass paraview in this way

Add this line in .C solver before the while (runTime.run()) :

OFstream massIntegral("massIntegral.dat");

Then in runTime loop put this line:

...
Forum: OpenFOAM October 4, 2010, 06:03
Replies: 19
Views: 3,827
Posted By nuovodna
partial solution

Hi, you can compute the cell volume with OF introducing in the solver code a piece like this


forAll(mesh.cells(), cellii)
{
cellVolume = mesh.V()[cellii];
}

And...
Showing results 1 to 5 of 5

 
Forum Jump

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