|
[Sponsors] |
Calculating flow variables only once in begin_f_loop() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 15, 2020, 15:38 |
|
#41 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
well in fact Im doing right same as that, I mean Im doing ok and i get the same valid results when I apply boundary conditions as : 1.no-slip and 2. slip with 1 micrometer slip length, but all problem i am dealing with is when i try to use slip length over 1 micrometer
can you help me in any way please?? |
|
June 15, 2020, 17:06 |
Reference
|
#42 |
Senior Member
|
Could you share the reference that you are validating against?
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 16, 2020, 07:14 |
|
#43 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
sorry for delay, and yes of course
this is the article title: Geometric optimization of an enhanced microchannel heat sink with superhydrophobic walls by :Hamidreza Ermagan, Roohollah Rafee and this is the doi: https://doi.org/10.1016/j.applthermaleng.2017.11.039 |
|
June 16, 2020, 07:42 |
Velocity Component
|
#44 |
Senior Member
|
Which velocity component are you hooking this UDF to? It has to be the velocity tangential to the boundary. Other velocities must be 0.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 16, 2020, 08:10 |
|
#45 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
i hook this UDF as x-component of velocity and put y & z components equal to zero, because as you can see the flow is along with x axis
|
|
June 16, 2020, 08:36 |
Image
|
#46 |
Senior Member
|
Where do I see that? Did you post a picture?
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 16, 2020, 08:56 |
|
#47 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
yeah actually i sent a picture. but i think it hasnt been uploaded. nevermind, i already did just like u said (applying udf to tangential component to the boundary) and i dont think my problem have any thing to do with basis settings. i just need to lower my residuals for the case slip length=20 micrometer. how could i do that?
|
|
June 16, 2020, 09:10 |
Stability and Convergence
|
#48 |
Senior Member
|
You can't stabilize a simulation if the physics is wrong. However, assuming that the physical setup is correct, you can try to bring in the changes slowly. Run the simulation with no-slip condition and then, after the case has achieved a stable state, hook the UDF.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 16, 2020, 09:17 |
|
#49 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
i did it yesterday, i run it with no slip, after it got converged, i hooked the UDF and then i run the calculation, it was stable and didnt diverged at all, but the only problem was that my residuals were too high, i mean about 1e03
|
|
June 16, 2020, 09:21 |
Convergence
|
#50 |
Senior Member
|
Residuals higher than 1 imply divergence.
Possibly, there is some other setting that is wrong. As you stated earlier, the gradient field does not look good. In that case, use reconstructed gradient.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 16, 2020, 09:29 |
|
#51 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
i used _RG instead of _G too, as u advised me to before, but it didnt work either. i even lower under relaxation factors for pressure and momentum, but still nothing, do i have to do something with advanced option in under relaxation part??
|
|
June 16, 2020, 10:02 |
Advanced Options
|
#52 |
Senior Member
|
If you are aware of multigrid methods, then you can change those options, otherwise, prefer not to touch those. Such kind of behavior is anyway not pointing towards numerics but physics itself. Create a Custom-Field-Function with 20 micrometer multiplied by the normal gradient. Plot its contour and see the numbers. If the velocities are much much higher than the average flow velocity, then you know the reason.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 23, 2020, 12:03 |
|
#53 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
ok Im done with velocity slip. but when I initialize the case and then try to apply temperature jump UDF, there occurs an error that says :"signal SIGSEGV". what sould I do to get rid of that?
|
|
June 23, 2020, 12:05 |
Code
|
#54 |
Senior Member
|
You have to correct the code. SIGSEGV implies that the UDF is trying to access something that is unavailable, most likely C_T_G in your case.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 23, 2020, 12:10 |
|
#55 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
yes you are right. I have used C_T_G in my code. what is wrong with this? what should I use instead?
|
|
June 23, 2020, 13:03 |
C_t_g
|
#56 |
Senior Member
|
If you use DEFINE_SOURCE for energy, then C_T_G automatically becomes available, otherwise you need to use following commands
Alloc_Storage_Vars(domain, SV_T_RG, SV_T_G, SV_NULL); T_derivatives(domain); Free_Storage_Vars(domain, SV_T_RG, SV_NULL); Ensure that the commands are in used in same sequence. domain should be pointing to domain of your case.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 23, 2020, 13:45 |
|
#57 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
actually i want to apply temperature jump for a wall. so should I write a code with "Define Profile" or with a "Define Source"?
|
|
June 23, 2020, 14:49 |
Temperature Jump
|
#58 |
Senior Member
|
Temperature jump is to be applied as a profile. So, you can use DEFINE_PROFILE.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
June 23, 2020, 15:55 |
|
#59 |
Member
Homayoon sohrabi
Join Date: May 2020
Posts: 56
Rep Power: 6 |
ok. so you are saying i should use Define Profile Macro and also use the following expressions within my code, right?
Alloc_Storage_Vars(domain, SV_T_RG, SV_T_G, SV_NULL); T_derivatives(domain); Free_Storage_Vars(domain, SV_T_RG, SV_NULL); |
|
June 23, 2020, 17:11 |
Udf
|
#60 |
Senior Member
|
Yes, that's correct. But DEFINE_PROFILE and temperature derivative have nothing to do with each other. Those can be used exclusive of each other as well.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
Tags |
fluent - udf - parallel, slip b.c., slip flow, udf and programming |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF program for calculating the mass flow outlet with a pulsed output flow | Benito89 | Fluent UDF and Scheme Programming | 9 | August 22, 2019 00:57 |
Match Pressure Inlet/Outlet Boundary Condition Mass Flow Rate | MSchneid | Fluent UDF and Scheme Programming | 3 | February 23, 2019 07:00 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
Calculating mass flow rate at multiphase flows | Kuslo187 | OpenFOAM Post-Processing | 1 | August 21, 2015 19:11 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |