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

Output volVectorField data into arrays with RTS

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2017, 23:09
Default Output volVectorField data into arrays with RTS
  #1
New Member
 
Qi Yang
Join Date: Oct 2017
Posts: 6
Rep Power: 9
qiyang is on a distinguished road
Hi Everyone,

I am trying to output every timestep data of volVectorField like U,T,p into arraies constructed by myself with RTS mechanism , would that be possible and anyone can give me some advices, I am writting my .C and .H files, just stunned by this problem. Thank you!

My member function looks as follows:

[
namespace Foam
{
defineTypeNameAndDebug(OutputU, 0);
defineRunTimeSelectionTable(OutputU,word);
addToRunTimeSelectionTable
(
OutputU,
OutputU,
word
);
}

// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //

void Foam::OutputU::volecityoutput() const
{
volVectorField& U=U.();
forAll(U,celli)
{
std::cout<<U[celli]<<"\n"<<std::endl;
}
}
]

Terminal tells me that U is not declared, I don't know how to declare it, I think with createFields.H I can directly use variable U.

Last edited by qiyang; November 18, 2017 at 14:59.
qiyang is offline   Reply With Quote

Reply

Tags
output data, rts


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
Run OpenFoam in 2 nodes of a cluster WhiteW OpenFOAM Running, Solving & CFD 16 December 20, 2016 01:51
Extract data in volVectorField to a primitive C or C++ data type cfbaptista OpenFOAM Programming & Development 4 February 15, 2016 07:02
Help! How to output slice data during run time? ripperjack OpenFOAM Pre-Processing 1 August 8, 2014 06:45
How to output data from stationary part only? Aerolex FLUENT 0 November 16, 2009 23:46
where is output data file[PHOENICS] DSF Main CFD Forum 1 June 8, 2000 10:15


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