|
[Sponsors] |
Heat source term using named expression for feedback control |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 2, 2022, 11:13 |
Heat source term using named expression for feedback control
|
#1 |
New Member
sg.lee
Join Date: Aug 2022
Posts: 4
Rep Power: 4 |
hello.
I am wondering how to set up feedback control in terms of heat src as shown in figure and expression. I'm not sure how to set "Src_old". I don't know how to set the volumetric heat source value used for the current iteration as a variable. <figure> |temp_sensor|<~~~heat~~~~|_heater_| |_(T_current)|<~~~heat~~~~|_(Src)__| |___[K]____ |<~~~heat~~~~|[W/m^3]| <named expression> T_target = 3000 [K] T_current = AreaAve(T, ['temp_sensor']) damp = 0.2 Src_new = Src_old*(1+damp*(T_target - T_current)/T_target))*1[W/m^3] Src_old = ??????? regards CFD user |
|
August 3, 2022, 01:28 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
as you've used Src_old to calculate Src_new probably you don;t need it anymore so Src_old = Src_new
show the whole UDF to get meaningfull answer, people cant read your mind if you are using DEFINE_SOURCE macro, then you probably need UDMs to store source values for the next timestep
__________________
best regards ****************************** press LIKE if this message was helpful |
|
August 8, 2022, 01:09 |
|
#3 | |
New Member
sg.lee
Join Date: Aug 2022
Posts: 4
Rep Power: 4 |
Quote:
I do not mean 'UDF', but 'named expression'. I need how to define src_old using 'named expression'. There is a variable called 'User Volumetric Energy Source', so I tried to set Src_current = VolumeAve(User Volumetric Energy Source, ,['heater']), but a message saying 'User Volumetric Energy Source could not be defined' appeared. I don't know how to define the heat source [W/m^3] used in the 'named expression', not 'UDF'. Thank you for your answer. |
||
August 10, 2022, 02:14 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
so you may try this approach
Code:
Src_new = VolumeAve(User Volumetric Energy Source, ,['heater'])*(1+damp*(T_target - T_current)/T_target))*1[W/m^3] VolumeAve(User Volumetric Energy Source, ,['heater']) = Src_new so you should check if "IF" condition is avaliable in expression: 1. yes -> you should check the time , if time ==0 -> apply some value to user columetric source, else expression above 2. no -> probably you may try to change expression manually -> apply some value to user columetric source on initial timestep, then manually change expression
__________________
best regards ****************************** press LIKE if this message was helpful |
|
August 10, 2022, 03:11 |
|
#5 | |
New Member
sg.lee
Join Date: Aug 2022
Posts: 4
Rep Power: 4 |
Quote:
thank you I've already used 'User Volumetric Energy Source', but a error message 'Cannot define User Volumetric Energy Source..?' appeared. Initialization was necessary with 'IF'. Thank you very much. |
||
August 24, 2022, 08:47 |
|
#6 | |
New Member
sg.lee
Join Date: Aug 2022
Posts: 4
Rep Power: 4 |
Quote:
So what about cfx? Do you know what variable corresponds to 'User Volumetric Energy Source' in CFX instead of fluent?? I would like to recalculate the same interpretation with CFX. If you know, please let me know. |
||
Tags |
expression, fluent, heat source, iteration, target temperature |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 14:48 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 10:07 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |