View Issue Details

IDProjectCategoryView StatusLast Update
0000777OpenFOAMBugpublic2018-06-17 21:49
Reporterdhora Assigned To 
PrioritynoneSeverityfeatureReproducibilityN/A
Status closedResolutionsuspended 
Summary0000777: csv output format for functionObjects
DescriptionThe functionObjects use different output formats. CSV files would be much more convenient for the generation of plots and the monitoring of the simulations. Only small changes would be necessary. Example for the forces functionObject:

//file() << obr_.time().value() << tab
// << "(" << sum(force_[0]) << "," << sum(force_[1]) << ") "
// << "(" << sum(moment_[0]) << "," << sum(moment_[1]) << ")"
// << endl;

file() << obr_.time().value() << ", "
       << sum(force_[0])[0] << ", " << sum(force_[0])[1] << ", " << sum(force_[0])[2] << ", "
       << sum(force_[1])[0] << ", " << sum(force_[1])[1] << ", " << sum(force_[1])[2] << ", "
       << sum(moment_[0])[0] << ", " << sum(moment_[0])[1] << ", " << sum(moment_[0])[2] << ", "
       << sum(moment_[1])[0] << ", " << sum(moment_[1])[1] << ", " << sum(moment_[1])[2]
       << endl;


It's not a major issue, just a proposal.

Best regards
David

TagsNo tags attached.

Activities

wyldckat

2015-02-01 17:02

updater   ~0003642

I took a look into this, because I actually thought this was already implemented in 2.3.x. But it's not.

What is implemented is a similar feature that is already implemented in the class "sampledSets", used by the "sampling" library... for sampling sets, namely these (quoted from "sampleDict"):
// uniform evenly distributed points on line
// face one point per face intersection
// midPoint one point per cell, inbetween two face intersections
// midPointAndFace combination of face and midPoint
//
// polyLine specified points, not nessecary on line, uses
// tracking
// cloud specified points, uses findCell
// triSurfaceMeshPointSet points of triSurface


In theory, this class "sampledSets" can be used as a basis for creating a new somewhat more generic class for writing out tabular data that was populated by other classes, such as the "forces" and "probes" classes.
This isn't hard to do, but it's essentially "bureaucratic coding", since it's mostly one to three management classes for storing data prior to writing...

The objective here seems to be that one or a few classes are needed for storing tabular data, or at least row data, before it's stored to the final file, in any specific format, already provided by the "Foam::writer" class.

wyldckat

2018-06-17 21:49

updater   ~0009792

Suspending this feature request, pending contribution and/or funding.

Issue History

Date Modified Username Field Change
2013-03-13 12:18 dhora New Issue
2015-02-01 17:02 wyldckat Note Added: 0003642
2018-06-17 21:49 wyldckat Status new => closed
2018-06-17 21:49 wyldckat Resolution open => suspended
2018-06-17 21:49 wyldckat Note Added: 0009792