|
[Sponsors] |
February 4, 2024, 15:31 |
0/T two boundary conditions on one wall
|
#1 |
New Member
Ibrahim I
Join Date: Feb 2024
Posts: 11
Rep Power: 2 |
Hi, in my 0/T folder on one wall I need a heat flux (W/m^2) and convective heat flux (W/m^2K). I tried defining these conditions separately for the same wall or putting it in the same bracket but openfoam only uses one of them not both. Is there a way of doing this without using swak4foam? Example code below in which openfoam only uses the second condition.
top_wall { type externalWallHeatFluxTemperature; value $internalField; q uniform 1000.0; mode flux; kappaMethod solidThermo; qr none; kappa none; thicknessLayers (); kappaLayers (); } top_wall { type externalWallHeatFluxTemperature; mode coefficient; Ta constant 313.0; h uniform 17.0; value $internalField; } |
|
February 9, 2024, 20:40 |
|
#2 |
New Member
Join Date: Apr 2023
Posts: 2
Rep Power: 0 |
Hi!
I don't know if you found a solution, but... I faced similar challenges with BC on a wall. I've experimented with some OF options and at the end codedMixed worked just fine. Link to documentation, it has a nice simple example: https://www.openfoam.com/documentati...atchField.html If you would have any questions feel free to ask! |
|
February 13, 2024, 06:14 |
|
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
If you test with the following, you will see what OpenFOAM itself sees: Code:
foamDictionary -expand 0/T https://develop.openfoam.com/Develop...foam/-/issues/ |
||
February 13, 2024, 06:22 |
|
#4 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
(https://api.openfoam.com/2312/classF...atchField.html) which allows you to use a PatchFunction1 for each of the three constituent parts. This can be especially convenient (compared to a complete coded mixed BC) since you can potentially specify some parts as constant or some other PatchFunction1, which include expressions and coded. IMO it is probably the best of both worlds - it offers full flexibility without necessarily needing to compile additional code. |
||
February 15, 2024, 04:54 |
|
#5 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
If you check the Code off that BC you Will see that you can use several BC for that wall, you just need to add all the needed parameters in the same boundary.
|
|
February 19, 2024, 16:09 |
|
#6 | |
New Member
Ibrahim I
Join Date: Feb 2024
Posts: 11
Rep Power: 2 |
Quote:
topWall { type externalWallHeatFluxTemperature; mode coefficient; mode flux; Ta constant 313; h uniform 17; q uniform 1000.0; value $internalField; kappaMethod solidThermo; qr none; kappa none; thicknessLayers (); kappaLayers (); } |
||
February 19, 2024, 16:10 |
|
#7 | |
New Member
Ibrahim I
Join Date: Feb 2024
Posts: 11
Rep Power: 2 |
Quote:
|
||
February 19, 2024, 19:24 |
|
#8 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
||
February 20, 2024, 13:59 |
|
#9 | |
New Member
Ibrahim I
Join Date: Feb 2024
Posts: 11
Rep Power: 2 |
Quote:
where q is flux W/m^2, h is HTC W/m^2K, k is thermal conductivity W/mK. Tinf is the ambient temperature, T is the boundary temperature. An article posted this code for groovyBC for this type of boundary: boundary { type groovyBC; variables "h=10.0;Tinf=100.0;k=10.0;q=150.0;"; valueExpression "Tinf"; fractionExpression "1.0/(1.0 + k/(mag(delta())*h))"; value uniform 100; gradientExpression "q/k"; } I'm struggling to get swak4foam on Mac, so I'm trying to use this as codedMixed, but I get error saying delta is undeclared identifier. How do I define delta? |
||
March 11, 2024, 19:16 |
|
#10 | |
New Member
Join Date: Apr 2023
Posts: 2
Rep Power: 0 |
Quote:
Hey, in my case I used deltaCoeffs(), it's a variable of a boundary patch that can be accessed Over here you can find a definition: (https://openfoamwiki.net/index.php/O...n;;deltaCoeffs) I hope that helps! |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |