|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Mey
Join Date: Dec 2019
Posts: 121
Rep Power: 7 ![]() |
Hi,
I would like to simulate warm air distribution in a car. I have a heat source that needs to be variable by changing the inside car temperature. This means that when I reach my target temperature in the car, the heat power should decrease. My problem is that I cannot write an expression at the point where my sensor is located. In fact, the expression I write has an error. Can you tell me how I should write a proper expression for this condition? condition: if Ttarget- Tsensor >0.5 K then Heat source power 10 kW if not Heat source power 5 kW . Variable --> Ttarget=21, Tsensor= Expression, Heat Source= Expression |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,901
Rep Power: 144 ![]() ![]() ![]() ![]() |
It is a few simple CEL expressions:
Ttarget = 21[C] Tsensor = probe(T)@Location HeatSourcePower = if(Ttarget- Tsensor >0.5 C,10[kW],5[kW]) And set the heat source to HeatSourcePower Note that this expression cannot be used for a steady state run as it has no steady solution. It can only be used for transient runs.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Mey
Join Date: Dec 2019
Posts: 121
Rep Power: 7 ![]() |
Dear Glenn,
I hope you are fine. As you said, this model or case is not for steady-state conditions. However, the expression Tsensor = probe(T)@Location does not work. I defined a small volume and then, instead of a point, used the volume (Domain) and wrote the expression like minVal(Temperature)@SensorDomain. Then it worked without an expression error. When I have a misunderstanding or make a mistake somewhere, please let me know. best, |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,901
Rep Power: 144 ![]() ![]() ![]() ![]() |
If you want to debug the probe approach please post your CEL and/or output file. Also include any error it is reporting.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? | EternalSeekerX | SU2 | 3 | October 9, 2020 19:28 |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
Outlet boundary condition in interFoam | Andrea_85 | OpenFOAM Running, Solving & CFD | 51 | July 20, 2017 14:31 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[snappyHexMesh] crash sHM | H25E | OpenFOAM Meshing & Mesh Conversion | 11 | November 10, 2014 12:27 |