|
[Sponsors] |
August 23, 2024, 01:52 |
Write an Expression by using a user Location
|
#1 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
Hello,
I would like to adjust my heat flux according to the wall temperature during my simulation. This means that when the temperature @ user location reaches ( Y ), the heat flux should be ( Z ). Therefore, I first write an expression for the location temperature (e.g., probe(Temperature)@user Location). Then I use this in the second expression as I mentioned above. However, I encountered an error: “The following unrecognized name was referenced: user location.” Can anyone guide me please? wishes, |
|
August 23, 2024, 04:53 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,819
Rep Power: 144 |
The CFX reference manual says the <Location> for the @probe function should be a point object, giving examples of a source point of a cartesian monitor point. Did you define your point as a source point or a cartesian monitor point?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 23, 2024, 07:30 |
|
#3 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
Hi Glenn,
I would like to be able to change my heat source (W) by changing the temperature of my user location, e.g., ´TL=Probe(Temperature)@user Location`, which is a point. As I mentioned, I have written two expressions: the first for TL, the temperature of the user point, and the second for the heat source, e.g., if(TL1<130, HS1+HS2,if(TL1<=130,HS1+15%*Hs2, HS1 )). I have tried to define TL as an additional variable, which I then use in the second expression; however, it did not work. The TL was referenced as an unrecognized name. what could be the problem? bests, |
|
August 23, 2024, 08:02 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,819
Rep Power: 144 |
You need to define a monitor point called "user Location", or a point source term called "user Location".
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 26, 2024, 02:23 |
|
#5 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
Hi,
I did not understand your meaning. My aim is not to monitor the values. I would like to change my heat source by changing the temperature at a specific location. As you mentioned, I defined a monitor point in Cartesian coordinates: Location x y z, with the output variable Temperature, and I named it Monuser. I also used it in my first expression: TL1 = avg(Temperature)@Monuser. Then, I used it in the second expression to change my heat source value: if(TL1 < 130[C], HS1 + HS2, if(TL1 <= 130[C], HS1 + 15% * HS2, HS1)). I received the following error: ERROR Attempt to evaluate the CEL callback function 'ave'. Although it is valid to create an expression that uses such a function, the preprocessor does not support its evaluation. ???????????? when I am completely wrong on the way please say to me how should I write for my aim a proper one. bests, |
|
August 26, 2024, 04:49 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,819
Rep Power: 144 |
"Monuser" is a point. You cannot take the average of a point, that is why you got the error. You use the TL = probe(T)@Monuser function to get the temperature value at the point and put it in CEL variable TL. You can then use it in any CEL expression.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 26, 2024, 07:38 |
|
#7 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
The problem is that whether I use an average on a surface or a probe at a point in an expression and then use it in another expression, the error will be the same. (see Attachment)
ERROR Attempt to evaluate the CEL callback function 'probe'. Although it is valid to create an expression that uses such a function, the preprocessor does not support its evaluation. ????? wishes |
|
August 26, 2024, 10:18 |
|
#8 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,887
Rep Power: 27 |
Looks like the probe for a point doesn't work in the solver. I think it is exclusively meant for CFD-Post.
I know from experience that it is possible to use an inlet temperature that is equal to a certain outlet temperature: Tinlet=areaAve(T)@Outlet. I think you should therefore make a named surface or a control volume in your geometry, mesh it and create the appropriate expressions. |
|
August 26, 2024, 11:39 |
|
#9 |
Senior Member
Join Date: Jun 2009
Posts: 1,851
Rep Power: 33 |
probe(<Variable>)@<Point Locator> works as followed:
1 - Validated for point locators ONLY. Such points include Source Point and other Monitor Points 2 - Re-validated, and executed during the simulation by the Ansys CFX Solver 3 - executed in CFD-Post if it is part of the EXPRESSIONs section created in the Ansys CFX Pre. Please post the full set of expressions used.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 27, 2024, 05:13 |
|
#10 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
Monitor Point: Monuser
FLOW: Flow Analysis 1 OUTPUT CONTROL: MONITOR OBJECTS: &replace MONITOR POINT: Monuser Cartesian Coordinates = 0.077 [m], 0 [m], 0 [m] Coord Frame = Coord 0 Option = Cartesian Coordinates Output Variables List = Temperature MONITOR LOCATION CONTROL: Interpolation Type = Nearest Vertex END POSITION UPDATE FREQUENCY: Option = Initial Mesh Only END END END END END TL1 Expression: probe(Temperature)@Monuser HZ1 Expression: areaAve(Temperature)@REGION:HZ1 HZ2 Expression: areaAve(Temperature)@REGION:HZ2 percent Expression: 0.0050*aitern/100 Heat Source Expression: if(TL1<130[C], HZ1+1*HZ1,if(TL1>=130[C],HZ1+percent*HZ1, HZ1 )) ERROR Attempt to evaluate the CEL callback function 'probe'. Although it is valid to create an expression that uses such a function, the preprocessor does not support its evaluation. |
|
August 27, 2024, 05:21 |
|
#11 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,819
Rep Power: 144 |
When does this error come up? Are you trying to evaluate the expression in CFX-Pre? Or in the solver?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 27, 2024, 05:23 |
|
#12 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
in cfx-Pre when I try to plot the heat source expression
|
|
August 27, 2024, 05:27 |
|
#13 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,819
Rep Power: 144 |
Of course the probe function does not work in CFX-Pre. It is just the pre-processor, so all the variable arrays have not been set up yet. The probe function takes the value of the array at a defined point, so will only work in the solver or post-processor after those variable arrays are set up in the solver.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 27, 2024, 05:30 |
|
#14 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
Can you suggest me a Solution?
If it is possible with other function? |
|
August 27, 2024, 05:31 |
|
#15 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,819
Rep Power: 144 |
Isn't it obvious? You have to run the solver.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 27, 2024, 06:04 |
|
#16 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
Thank you.
However, it would be better if it were possible to plot the expression before running it. wishes |
|
August 27, 2024, 06:19 |
|
#17 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,887
Rep Power: 27 |
Then define a fluctuating temperature (sinusoidal?) and use that as an example probe. If that works, then probably your control expression will work as well. Provided your example probe is representative for the deviations you expect in your simulation.
BTW, I don't see the variable "time", but "aitern". So you are running steady state? |
|
August 27, 2024, 06:36 |
|
#18 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
Thank you both.
Due to the size of my model, I want to calculate it in steady state first. However, as you have realized, the case should be considered in transien. I manually calculate how the values change during the calculation process. it look well. reagrds, |
|
August 27, 2024, 06:52 |
|
#19 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,819
Rep Power: 144 |
And have a careful think about whether this setup is really steady state at all. How can it be steady state if the source term keeps changing?
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
August 27, 2024, 07:12 |
|
#20 |
Member
Mey
Join Date: Dec 2019
Posts: 99
Rep Power: 6 |
I just want to check the influence of my heat source changing on my outlet temperature.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can I write temperature dependent UFD code in ansys fluent expression? | GreyMat | FLUENT | 0 | August 9, 2022 10:53 |
Ansys Fluent Expression ISO Surface not appearing in Location button | ebrahem | Fluent UDF and Scheme Programming | 2 | January 12, 2022 06:43 |
can user define a location dependent density in Define_property udf macro? | Pmaroul | Fluent UDF and Scheme Programming | 2 | January 21, 2019 15:34 |
Evaluating expression at a specific location in CFX Pre | gotang | CFX | 4 | August 17, 2017 10:33 |
Need help to write scripts in User Fortran | Casper_07 | CFD Freelancers | 1 | April 12, 2016 12:59 |