|
[Sponsors] |
problem with mixed/Robin boundary condition for Temperature |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 8, 2015, 15:03 |
problem with mixed/Robin boundary condition for Temperature
|
#1 |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 13 |
Hi, all
I'm trying to build a mixed boundary condition for temperature profile, the boundary condition is an expression related to both Temperature and Temperature gradient, but there's some error come out after I initialize. My code is: DEFINE_PROFILE(Temperature_profile,t,i) { face_t f; cell_t c; Thread*t0; real x[ND_ND]; real y; begin_f_loop(f,t) { t0=THREAD_T0(t); c=F_C0(f,t); F_CENTROID(x,f,t); y=x[1]; F_PROFILE(f,t,i)=(200-20*(1-y)+C_T_G(c,t0)[0]/0.002)/(100+9.8*(1-y); } end_f_loop(f,t) } My current physical model is very simple, just a 2D rectangular area. Thank you so much. PS: I don't know why but the program sometimes works and sometimes not, but even if it could run successfully, the result seems not correct. The error looks like this: MPI Application rank 0 exited before MPI_Finalize() with status 2 The f1 process could not started |
|
March 8, 2015, 15:46 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Here's a relevant thread and have you tried running Fluent in serial instead of parallel?
|
|
March 8, 2015, 16:23 |
|
#3 | |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 13 |
Quote:
Thanks for your reply, but when I try to use serial instead of parallel, there's another error comes out: Error: received a fatal signal (segmentation fault) |
||
March 8, 2015, 19:20 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Have you interpreted or compiled the UDF? Try compiling the UDF.
Ensure the RHS for F_PROFILE is correct and use trailing periods to evaluate 200, etc, as real data types. Lastly, try setting the RHS of F_PROFILE to a constant value and if this run still fails, then perhaps there's something wrong with the mesh (maybe Fluent is trying to access a cell face that doesn't exist). |
|
March 8, 2015, 23:17 |
|
#5 |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 13 |
I interpreted the UDF, is compiling going to make a difference?
I'm thinking the error might caused by the index, do you think it's correct that on the LHS I have F_PROFILE(f,t,i) and on the RHS I have C_T_G(c,to)[0]? Thank you. |
|
March 9, 2015, 00:04 |
|
#6 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
When troubleshooting code it's important to first isolate what the problem exactly; you can achieve this task by building the program step by step (or removing/simplifying your code step by step). I've suggested a method of trying to isolate the problem code above.
|
|
March 9, 2015, 00:19 |
|
#7 |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 13 |
Sorry that I didn't mention that I've tried setting the RHS as constant and it works. I also tried making the RHS as 1-y, it also works well.
|
|
March 9, 2015, 00:26 |
|
#8 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
It appears that gradient data may or may not be defined in the first iteration according to HenrikS in this post (try his suggestion).
|
|
Tags |
gradient, mixed boundary condition, temperature profile, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 01:00 |
CFX fails to calculate a diffuser pipe flow | shenying0710 | CFX | 7 | March 26, 2013 05:13 |
problem about periodic boundary condition in Fluent | winnawinna | FLUENT | 0 | December 29, 2010 00:32 |
How to use a solution as an inlet boundary condition in another problem in fluent | geryes | FLUENT | 0 | February 25, 2010 17:32 |
a problem with Boundary condition | M Rad | Main CFD Forum | 12 | November 27, 1998 13:49 |