|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Utkan Erdem
Join Date: Sep 2020
Posts: 19
Rep Power: 7 ![]() |
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. |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 41 ![]() ![]() |
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). |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Utkan Erdem
Join Date: Sep 2020
Posts: 19
Rep Power: 7 ![]() |
Thank you olesen for your reply.
I will look into Patchfunction1 and see if I can manage to get it done. |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 41 ![]() ![]() |
||
|
|
|
|
|
|
|
#5 |
|
New Member
Utkan Erdem
Join Date: Sep 2020
Posts: 19
Rep Power: 7 ![]() |
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? |
|
|
|
|
|
|
|
|
#6 |
|
New Member
parth
Join Date: Feb 2020
Posts: 23
Rep Power: 7 ![]() |
Is this functionality is available to OpenFOAM v1812?
|
|
|
|
|
|
|
|
|
#7 |
|
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 41 ![]() ![]() |
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 |
|
|
|
|
|
|
|
|
#8 |
|
New Member
parth
Join Date: Feb 2020
Posts: 23
Rep Power: 7 ![]() |
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 |
|
|
|
|
|
|
|
|
#9 |
|
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 41 ![]() ![]() |
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.
|
|
|
|
|
|
![]() |
| Tags |
| .txt, boundary condition, externalwallheatfluxtemp, time-varying |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| bash script for pseudo-parallel usage of reconstructPar | kwardle | OpenFOAM Post-Processing | 43 | October 28, 2025 04:19 |
| [Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
| AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
| Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
| mixerVesselAMI2D's mass is not balancing | sharonyue | OpenFOAM Running, Solving & CFD | 6 | June 10, 2013 10:34 |