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

How to use IOList

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2008, 10:26
Default Hi, I have modified icoLagr
  #1
Member
 
florian
Join Date: Mar 2009
Location: Mannheim - Vincennes - Valenciennes, Deutchland - France
Posts: 34
Rep Power: 17
floooo is on a distinguished road
Hi,

I have modified icoLagrangianFoam in a rhoPourousSimpleLagrangianFoam.

I have the position of particules which hit a filter.

Info << "position : "<<particule() << endl work
It works
position : (0.005758021228 0.01650806108 0.001)

Now I whant to write these positions in a file in order see it in paraFoam

I try with C and C++ but it doesn't work because position Type is Vector

C++ version

std::ofstream file("porous_hit", std::ios_base::out | std::ios_base::trunc);
if(file)
{
file << position() << std::endl;
file.close();
}


C version

FILE* file = NULL;
file = fopen("porous_result", "a");
fprintf(file,"%ld",position());
fclose(file);

I think the only solution is to use IOList but i don't know how

If it works my next step will be to stop only the bigest particules.
floooo is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



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