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

fvOption to take csv/txt file as heat source file

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By Yann
  • 1 Post By ibitscholar
  • 2 Post By AtoHM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2024, 14:37
Default fvOption to take csv/txt file as heat source file
  #1
New Member
 
Henry
Join Date: Feb 2024
Posts: 5
Rep Power: 2
ibitscholar is on a distinguished road
Hello all,
I am trying to configure fvOption to take a csv/text file for the heat source for each time step for my selected cellSet. The csv/txt file would have the 1st and 2nd column as the timestep and power (W) respectively. I was wondering if there is a way to configure fvOption in OpenFoam_v6 for this?

I would really appreciate all your help. Thanks!

Below is a sample of my fvOption file

Code:
heatSource
{
  type   scalarSemiImplicitSource;
  active true;

    scalarSemiImplicitSourceCoeffs
    {
        selectionMode     cellSet; 
        cellSet               heat_point;
        volumeMode      absolute;
        injectionRateSuSp
        {         //heat energy in Watts for each timestep
            h   (120 0) (100 0) (150 0) (200 0) (170 0);  //Watt
        }
    }
}
ibitscholar is offline   Reply With Quote

Old   June 24, 2024, 03:50
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,177
Rep Power: 27
Yann will become famous soon enough
Hello Henry,

As far as I know it's not possible with OpenFOAM-6.
It should be possible on OpenFOAM-8 and newer versions.

For the OpenCFD branch, on OpenFOAM-v2006 and newer versions.

Regards,
Yann
AtoHM and ibitscholar like this.
Yann is offline   Reply With Quote

Old   June 25, 2024, 08:42
Default
  #3
New Member
 
Henry
Join Date: Feb 2024
Posts: 5
Rep Power: 2
ibitscholar is on a distinguished road
Hi Yann,

Many thanks for your response. I will try out OpenFoam-8 and see if it works.

Cheers,
Henry
Yann likes this.
ibitscholar is offline   Reply With Quote

Old   June 26, 2024, 02:27
Default
  #4
Senior Member
 
M
Join Date: Dec 2017
Posts: 695
Rep Power: 12
AtoHM is on a distinguished road
I regularily use Excel to reformat such data into the form to directly put into fvOptions. Then there is no need for an additional file. Lets say you have your time in column A and value in column B, insert this in C1, drag down through all your values. Select all cells in C, Ctr + C and insert into fvOptions. Done.

Code:
="("&A1&" "&B1&")"
Yann and ibitscholar like this.
AtoHM is offline   Reply With Quote

Reply

Tags
fvoptions, fvoptions heat source


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
[openSmoke] LaminarSMOKE compilation error mdhfiz OpenFOAM Community Contributions 8 July 2, 2024 10:32
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 03:50
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42


All times are GMT -4. The time now is 23:56.