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

Time varying externalWallHeatFlux

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By olesen
  • 1 Post By olesen
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2022, 15:01
Question Time varying externalWallHeatFlux
  #1
New Member
 
Utkan Erdem
Join Date: Sep 2020
Posts: 19
Rep Power: 5
Utkan is on a distinguished road
Hello everyone,
I am trying to feed a tabular .txt format into my T file under the 0 folder. The .txt file has external heat fluxes for each patch in each column. And with each row, the heat fluxes are incremented by one time step.

How can I feed such a file into the T file in my case?
Is there a way to use externalWallHeatFlux BC with varying heat fluxes?

I can supplement additional info about my case and the setup if asked. Thank you.
Utkan is offline   Reply With Quote

Old   February 20, 2022, 06:11
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
According to the docs https://www.openfoam.com/documentati...d.html#details
the heat flux can be specified as a PatchFunction1 - ie, space and time varying. If you have tabulated values, the first column will normally represent time (not time step).
Utkan likes this.
olesen is offline   Reply With Quote

Old   February 20, 2022, 07:08
Default
  #3
New Member
 
Utkan Erdem
Join Date: Sep 2020
Posts: 19
Rep Power: 5
Utkan is on a distinguished road
Thank you olesen for your reply.
I will look into Patchfunction1 and see if I can manage to get it done.
Utkan is offline   Reply With Quote

Old   February 20, 2022, 07:55
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Utkan View Post
Thank you olesen for your reply.
I will look into Patchfunction1 and see if I can manage to get it done.
PatchFunction1 is mostly like a regular Function1
olesen is offline   Reply With Quote

Old   February 24, 2022, 12:32
Default
  #5
New Member
 
Utkan Erdem
Join Date: Sep 2020
Posts: 19
Rep Power: 5
Utkan is on a distinguished road
Hello Olesen,
I am new to coding in OpenFOAM, how can I practice before getting busy with Function1?
Can you guide me how to specify my tabular heat flux file as a patchFunction1 type?
Where should I start?
Utkan is offline   Reply With Quote

Old   June 11, 2022, 02:18
Default
  #6
New Member
 
parth
Join Date: Feb 2020
Posts: 23
Rep Power: 6
parthigcar is on a distinguished road
Is this functionality is available to OpenFOAM v1812?
parthigcar is offline   Reply With Quote

Old   June 21, 2022, 05:15
Default
  #7
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by parthigcar View Post
Is this functionality is available to OpenFOAM v1812?

Unlikely to be in that version, but see the corresponding commit if you want to do a mini backport yourself:
https://develop.openfoam.com/Develop...a8792d838ac365
parthigcar likes this.
olesen is offline   Reply With Quote

Old   June 21, 2022, 06:02
Default
  #8
New Member
 
parth
Join Date: Feb 2020
Posts: 23
Rep Power: 6
parthigcar is on a distinguished road
Code:
        Patch
       {
        type              codedFixedValue;
        value             uniform 300;
        name             some_name;
        codeInclude     
        #{
            #include "fvCFD.H"
            #include <cmath>
            #include <iostream>
        #};
        code
        #{
        scalarField& field = *this;
        field = this->patchInternalField() + (q(t)/(kappa * this-> patch().deltaCoeffs()));
        #};
        codeOptions
        #{
            -I$(LIB_SRC)/finiteVolume/lnInclude \
            -I$(LIB_SRC)/meshTools/lnInclude
        #};
}

Thank you, Mark Olesen. I will try your backport. In between, I have implemented codedFixedValue boundary condition for time-varying heat flux. Is the above implementation correct? @Mark_Olesen
parthigcar is offline   Reply With Quote

Old   June 21, 2022, 07:54
Default
  #9
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
I would simply not waste the time with a coded BC. You never know what other problems you will have, or things you have forgotten. Fastest is either your own backport (can probably even just use a plain diff to piece together what you need) or bump up to a new OpenFOAM version.
parthigcar likes this.
olesen is offline   Reply With Quote

Reply

Tags
.txt, boundary condition, externalwallheatfluxtemp, time-varying


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
bash script for pseudo-parallel usage of reconstructPar kwardle OpenFOAM Post-Processing 41 August 23, 2023 02:48
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 11:08
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34


All times are GMT -4. The time now is 01:21.