|
[Sponsors] |
Inlet temperature = outlet temperature + offset? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 3, 2016, 09:06 |
Inlet temperature = outlet temperature + offset?
|
#1 |
New Member
Hans
Join Date: Sep 2016
Posts: 8
Rep Power: 10 |
Hello OpenFoamers,
i am new to OpenFoam since 2 month. I am simulation a hot waterflow into a big cylinder using the bouyantBoussinesqPimpleFoam solver. I managed to set up the case and the results are looking good in my opinion. Now to my problem: My 0/T file looks like: internalField uniform 20; boundaryField { inlet { type fixedValue; value 80; } outlet { type zeroGradient; } ... } Now i want to change my constant inlet Temperature while the simulation. I want to check the outlet temperature, add 10 degrees and use the new calculated falue as inlet value until i reached a maximum temperature at the outlet! I read something about cyclic (e.g. jumpCyclic) conditions? But in that case my complete inlet flow is "connected" to the outlet, which i didnt really managed to set up. Is it maybe possible to read the temperature values at the outlet every timestep, add a constant value and use it as inlet temperature? Thank you in advance for reading my problems ! |
|
November 4, 2016, 10:05 |
|
#2 |
New Member
Hans
Join Date: Sep 2016
Posts: 8
Rep Power: 10 |
Hello Openfoamers,
i found the groovyBC application and after installing and setting it up i managed to set the temperature from the outlet onto the inlet with my offset: In 0/T: ... inlet { type groovyBC; valueExpression "tOutlet+10"; variables "tOutlet{outlet}=T;"; value uniform 293;//=20° C } outlet { type zeroGradient; } In the end it works fine for me. The only strange thing i cant explain is that the temperature at the inlet is much bigger at the wall than in the middle of the tube. But after a few iterations the hole inlet face reaches the calculated temperature "tOutlet+10". Maybe someone knows about this strange behaviour... Regards |
|
November 7, 2016, 18:14 |
|
#3 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The problem is that the "first" face in the inlet patch and the "first" one in the outlet do not necessarily correspond. Therefor remove variables should usually only have uniform values (swak doesn't enforce this for cases where it actually makes sense). So better values for tOutlet would be (in increasing order of "physicality"): "tOutlet{outlet}=average(T);" "tOutlet{outlet}=sum(T*area())/sum(area());" "tOutlet{outlet}=sum(T*phi)/sum(phi);" If you need the non-averaged values from the outlets then there is something called mappedPatch and swak can work with that. Have a look at Examples/tests/mapping*
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
November 8, 2016, 10:33 |
|
#4 |
New Member
Hans
Join Date: Sep 2016
Posts: 8
Rep Power: 10 |
Thank you very much for your reply gschaider,
Yes my inlet patch and cell formation look the same like on the outlet. Thanks to your codeline "tOutlet{outlet}=average(T);" i dont get the warning massage anymore which i think is because of the unifrom values like you explained: -->FOAM Warning : From Function ExpressionResult::getUniformInternal(const label size,bool noWarn) in file ExpressionResult/ExpressionResultI.H at line 350 The minimum value 293 and the maximum 293 differ. I will use the average 293 But the strange behaviour i mentioned still occurs with both of the first 2 codelines that you posted. The third one is crashing with an Error. But i am glad enough that i solved the warning message (and did understand it) and the temperature is constant over the diameter after a few iterations!! Regards |
|
November 8, 2016, 16:15 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The warning you posted means that swak automatically defaulted to variation 1 all the time. No idea about the wall (but it might have something to do with your intitial conditions and the wall BC)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
November 14, 2016, 07:36 |
|
#6 |
New Member
Hans
Join Date: Sep 2016
Posts: 8
Rep Power: 10 |
Yes the new third version is running proprely.
But this doesnt fix the bahaviour as well, but for my case its good enough. thanks a lot for your posts gschaider, it helped me a lot. Regards |
|
Tags |
inlet bc temperature |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
massflow of inlet and outlet are not equal | knoedl1 | OpenFOAM Running, Solving & CFD | 11 | July 3, 2018 15:00 |
Want Impeller Driven Fluid Flow: What Inlet and Outlet BC to use for Centrifugal Pump | Zev Xavier | FLUENT | 3 | May 9, 2016 07:42 |
simpleFoam: Non-uniform mesh near inlet & outlet causes incorrect velocity profile? | Zaphod'sSecondHead | OpenFOAM Running, Solving & CFD | 0 | January 28, 2015 06:17 |
UDF profile: Fluent method for coupling inlet and outlet | I-mech | Fluent UDF and Scheme Programming | 0 | May 10, 2014 11:36 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |