|
[Sponsors] |
Time-varying BC with externalWallHeatFluxTemperature |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 30, 2020, 07:02 |
Time-varying BC with externalWallHeatFluxTemperature
|
#1 |
New Member
Romain SL
Join Date: Apr 2020
Location: Lyon, France
Posts: 8
Rep Power: 6 |
Hello,
I'm new on this forum and OpenFOAM so I hope that I'm posting at the right place and that I'll be clear enough. So, I found this boundary condition 'externalWallHeatFluxTemperature' that seems perfect for my case. But I would like to impose a sinusoidal heat flux and I don't manage to write it down. The best I managed to get was a time-varying external temperature like this (and that works well) but that does not correspond perfectly to the reality of the problem: Code:
upperFace { type externalWallHeatFluxTemperature; mode coefficient; Ta { type sine; frequency 0.1; amplitude 4; scale 1; level 293; } h uniform 50; thicknessLayers (0.002); kappaLayers (0.16); kappaMethod fluidThermo; value $internalField; } Code:
--> FOAM FATAL IO ERROR: Attempt to return dictionary entry as a primitive file: /home/romain/OpenFOAM/romain-7/run/pipe_v5.3/0/T.boundaryField.lowerFace.q from line 52 to line 56. From function virtual Foam::ITstream& Foam::dictionaryEntry::stream() const in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 83. FOAM aborting |
|
May 3, 2020, 11:43 |
|
#2 |
New Member
Romain SL
Join Date: Apr 2020
Location: Lyon, France
Posts: 8
Rep Power: 6 |
Nobody?
I think it's just a question of syntax but I can't figure it out. There is probably only one word missing to allow OpenFOAM to understand that the flux needs to be time-varying and I can't find it... |
|
May 3, 2020, 14:46 |
|
#3 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
The error report is related to `lowerFace`'s `q`, rather than the `upperFace` reported above.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
May 4, 2020, 04:08 |
|
#4 | |
New Member
Romain SL
Join Date: Apr 2020
Location: Lyon, France
Posts: 8
Rep Power: 6 |
Quote:
That's what I try to run (the range of q is not coherent but that's not the problem) and I precise that I get the same error for the two other modes (power and flux): Code:
upperFace { type externalWallHeatFluxTemperature; mode flux; q { type sine; frequency 0.1; amplitude 4; scale 1; level 293; } thicknessLayers (0.002); kappaLayers (0.16); kappaMethod fluidThermo; value $internalField; } |
||
May 4, 2020, 16:06 |
|
#5 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
That is because it is not programmed to do so.
externalWallHeatFluxTemperatureFvPatchScalarField. H: Code:
scalar Q_; //- Heat flux [W/m^2] scalarField q_; //- Heat transfer coefficient [W/m^2K] scalarField h_; //- Ambient temperature [K] autoPtr<Function1<scalar>> Ta_; //- Heat power [W] You can take the boundary condition, rename it, and compile a new boundary condition. Add an additional Function1 entry and simply multiply that with the q field, which you'll define as 1. Or e.g change Q from scalar to Function1. Something like this with additional changes in the .C file: Code:
autoPtr<Function1<scalar>> yourValue_; |
|
May 5, 2020, 04:34 |
|
#6 |
New Member
Romain SL
Join Date: Apr 2020
Location: Lyon, France
Posts: 8
Rep Power: 6 |
Oh ok I see, it's more difficult than I thought. I have never done this before but I will try what you propose.
Thanks a lot for your help! |
|
June 14, 2021, 22:08 |
|
#7 |
New Member
Hamdani
Join Date: Nov 2011
Posts: 5
Rep Power: 15 |
Hi
Did you succeed to compile the new BC? If yes, please let me know the step-by-step what you did. It would be very helpful. |
|
Tags |
externalwallheatfluxtemp, time-varying bc |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
bash script for pseudo-parallel usage of reconstructPar | kwardle | OpenFOAM Post-Processing | 42 | May 8, 2024 00:17 |
[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 |