|
[Sponsors] |
March 12, 2024, 16:35 |
Vary inlet velocity based on temperature
|
#1 |
New Member
Join Date: Feb 2024
Posts: 5
Rep Power: 2 |
Hi everyone, I'd much appreciate some advice / guidance. I've used codedMixed quite a lot to vary boundary conditions based on time. I was hoping someone has perhaps varied inlet velocity based on a temperature located at a predefined location in the system volume and could perhaps share how they achieved this. Alternatively anyone knowledgeable that would be so kind as to point me in the right direction. Thanks
|
|
March 13, 2024, 03:32 |
|
#2 |
Senior Member
Join Date: Dec 2021
Posts: 207
Rep Power: 5 |
Hey!
I think inputValueMapper can probably achieve what you do. Here is an example by Tobias Holzmann: https://www.linkedin.com/pulse/new-f...obias-holzmann I tried to use it several times, but I find it very confusing you basically need a functionObjet that stores some quantities that inputValueMapper can then read and use. Also, I could not make it work with precompiled OpenFoam for Windows (v2212). I had to recompile OpenFoam with slight modifications (cant remember what, but a thread was discussing this) and run my tests on Linux. Maybe it was fixed though. If you manage to make it work, please share the setup, I am curious to see more examples of this feature that could be really useful! EDIT: This thread shows the changes to the code, but it was because of one specific boundary condition. Other boundary conditions worked even with precompiled OpenFoam. |
|
March 13, 2024, 03:39 |
|
#3 | |
New Member
Join Date: Feb 2024
Posts: 5
Rep Power: 2 |
Quote:
Thanks, really appreciate that. I'm on wsl at the moment. I'll definitely share if I can get it to work. |
||
March 13, 2024, 06:01 |
|
#4 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
This can be easily done by codedFixedValue. A template can be seen as:
inlet { type codedFixedValue; value uniform (10 0 0); name linearTBC1; code #{ const fvMesh& mesh = this->patch().boundaryMesh().mesh(); volVectorField& U = mesh.lookupObjectRef<volVectorField>("U"); #}; } What you need is just access your field (U in the above code, T for your code) in the boundary condition.
__________________
My OpenFOAM algorithm website: http://dyfluid.com By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html |
|
March 13, 2024, 07:52 |
|
#5 |
New Member
Join Date: Feb 2024
Posts: 5
Rep Power: 2 |
Thanks, I'll give that a try! Much appreciated.
|
|
March 17, 2024, 04:47 |
|
#6 | |||
New Member
Join Date: Feb 2024
Posts: 5
Rep Power: 2 |
Hi sharonyue,
I tried your proposed method below: Quote:
Since I want to access the temperature field at the outlet boundary condition I modified it as follows: Quote:
Quote:
|
||||
March 17, 2024, 04:49 |
|
#7 | |
New Member
Join Date: Feb 2024
Posts: 5
Rep Power: 2 |
Quote:
Looking at that thread, I was not able to get this working for that boundary condition |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Variable inlet temperature in Fluent | yogesh03y | FLUENT | 0 | January 20, 2023 09:11 |
Issues on the simulation of high-speed compressible flow within turbomachinery | dowlee | OpenFOAM Running, Solving & CFD | 11 | August 6, 2021 06:40 |
using outlet velocity profile as inlet for next set of iterations | tricha122 | FLUENT | 0 | November 22, 2020 09:40 |
kindly help me .. i have and error at line number 147.. | m zubair | Fluent UDF and Scheme Programming | 0 | February 10, 2019 11:25 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 05:13 |