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

how to write dynamic list into excel file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2023, 02:54
Default how to write dynamic list into excel file
  #1
New Member
 
Parth1999's Avatar
 
Parth
Join Date: Feb 2021
Posts: 14
Rep Power: 5
Parth1999 is on a distinguished road
Hi
i have created a dynamic list in my solver and after the computations are completed i need to write this list of scalar in excel file or txt file


pls help
Parth1999 is offline   Reply With Quote

Old   March 29, 2023, 03:20
Default
  #2
New Member
 
Parth1999's Avatar
 
Parth
Join Date: Feb 2021
Posts: 14
Rep Power: 5
Parth1999 is on a distinguished road
Quote:
Originally Posted by Parth1999 View Post
Hi
i have created a dynamic list in my solver and after the computations are completed i need to write this list of scalar in excel file or txt file


pls help
i used this approach to solve first i defined a function like this
void out_it(Foam:ynamicList<float> bla,string outpit)
{
std:fstream output;
output.open(outpit);
for (label j=0; j < bla.size(); j++)
{
output << bla[j];
output << "\n";
}
output.close();
}


then after at the bottom of solver just before return i used this function
here bla is ur dynamics list and outpit is the name of file in which you want ur output eg - "output.txt" etc

this post helped me alotWriting/output of simple data into an ASCII-File
Parth1999 is offline   Reply With Quote

Reply


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
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 15:30
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 17:05
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57


All times are GMT -4. The time now is 07:24.