|
[Sponsors] |
Fluent do not use my velocity field(by UDF) to solve energy equation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 21, 2019, 10:18 |
Fluent do not use my velocity field(by UDF) to solve energy equation
|
#1 |
New Member
tang lei
Join Date: Jan 2019
Location: Shenzhen China
Posts: 15
Rep Power: 7 |
Fluent do not use my velocity field(by UDF) to solve energy equation
Hello, everyone. Rencently, I am dealing with a case described as followsI simplified the problem, in order to describe it clearly) There is cylinder pipe, which have an inlet and outlet. The bondery condition is : Inlet: velocity-inlet,constant temperature outletressure-outlet wall:constant temperature The thing is that, I got an analytic solution of the velocity field. so I frozen the momentum equation, and only solve the energy equation. To do this, I have written a UDF file to set the value of velocity field of all the fluid cell zone. Then, I begin to calculate the case.but the result is very strage. Fluent read my velocity field correctly (both CFD-POST and monitor plot can aprove this). But the temperature field is incorrect. Then I did several more tests. The result is the same. And I find that. Fluent can always read my velocity field(by UDF), but when fluent solveing energy equation, it wont use my u,v,w. Fluent always use the initial value to solve the equation. I compile UDF with the MACRO DEFINE_EXCUTE_AT_END. then I have tried other MOCROs,including DEFINE_ADJUST, DEFINE_PROFILE(cell zone fixed velocity u,v,w). The result is still the same, the software read my velocity correctly, but still use the initial velocity value to solve the energy equation. BTW, I use interpreted UDF, does it matters? OK this is a long story. If you have any idea about my problem please give me some advise. An other thing is, I have to adjust the velocity field according to the result during the solving process, so I can not just simply set a fixed initial field using DEFINE_INIT. Thanks. |
|
January 21, 2019, 11:48 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
If Fluent always takes the initial value to solve the energy equation, then just use your UDF to set the initial value. What is the initial value? Just change it.
Also try using the fixed values option in cell zones. |
|
January 21, 2019, 12:00 |
|
#3 |
New Member
tang lei
Join Date: Jan 2019
Location: Shenzhen China
Posts: 15
Rep Power: 7 |
Thank you.But the thing is not that simple. The velocity field is changing during the solver running. but the DEFINE INIT can be juat loaded once when at the beginning.
|
|
January 21, 2019, 12:55 |
|
#4 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
Oh I missed the part where you mentioned that the velocity changes every iteration/time-step.
Well you can still use patch fields to set the new initial velocity each time according to your profile. Or you can still also use fixed values. |
|
January 21, 2019, 19:51 |
|
#5 |
New Member
tang lei
Join Date: Jan 2019
Location: Shenzhen China
Posts: 15
Rep Power: 7 |
I have teied cell zone fix value. Nothing changed. the situation is the same but how to use patch to deal with it?
|
|
January 21, 2019, 21:05 |
|
#6 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
Try again. You must've messed something up if even fixed values did not work.
Patch just allows you to overwrite a field. You still need to freeze and fix the fields. |
|
January 21, 2019, 22:28 |
|
#7 |
Senior Member
Join Date: Feb 2010
Posts: 164
Rep Power: 17 |
You can first define the initial velocity field using DEFINE_INIT, then Enter menu "solve->controls", push the button "Equations" and then uncheck the "Flow" equation. This will notify Fluent that you won't solve velocity field anymore. Fluent will always use the inital velocity value in later computation.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |
How to solve a scalar equation with Fluent | Tomik | FLUENT | 1 | January 8, 2006 07:18 |
how solve a scalar equation with Fluent | tomik | FLUENT | 0 | January 5, 2006 07:38 |
UDF to switch on energy equation after X iteration | mat w | FLUENT | 6 | December 5, 2005 08:35 |
Why FVM for high-Re flows? | Zhong Lei | Main CFD Forum | 23 | May 14, 1999 14:22 |