|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
MASOUD
Join Date: Mar 2009
Posts: 102
Rep Power: 16 ![]() |
Hi folks,
I've got a quick question; here it is: How can I impose a Robin (or maybe Mixed) boundary condition in internal or external boundaries, for a gas species in? If writing a UDF is a solution, then where can we hook it up? Any feedback is highly appreciated. Masoud |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
MASOUD
Join Date: Mar 2009
Posts: 102
Rep Power: 16 ![]() |
Thanks Amir.
First off, I would assume this is possible for 'external' boundaries. How about for internals? Next, I wrote the following UDF which works fine. But as soon as I change '0.72' to F_PROFILE(f,t,i)=((0.1*F_YI_G(f,t,i))+0.48); and re-compile it, get this error: UDFsconv.obj : error LNK2019: unresolved external symbol _F_YI_G referenced in function _AGC_MASS_TRAN libudf.dll : fatal error LNK1120: 1 unresolved externals Any idea why this is happening? ====== DEFINE_PROFILE(AGC_MASS_TRAN,t,i) { face_t f; begin_f_loop(f,t) { F_PROFILE(f,t,i)=0.72; } end_f_loop(f,t) } ======= |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Senior Member
|
Hi,
if you mean internal walls (which need boundary conditions) it doesn't have any differences with this procedure!! about your code, there are many problems in it, I provide a template for you; change that for your cases: Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
MASOUD
Join Date: Mar 2009
Posts: 102
Rep Power: 16 ![]() |
Thanks. But what is the purpose of
t0=THREAD_T0(t); and c=F_C0(f,t); |
|
![]() |
![]() |
![]() |
![]() |
#6 | |
Senior Member
|
Quote:
Regards, Amir |
||
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
MASOUD
Join Date: Mar 2009
Posts: 102
Rep Power: 16 ![]() |
I can admit the fact that I'm totally confused with this feedback from Ansys customer support! Does this make sense to you at all? Here it is:
------------------- A convective boundary condition cannot be imposed on internal or external boundary (wall boundary). For a wall either a zero diffusive flux or a constant value (which can be modified using a UDF) can be specified. You need to use source terms on either sides of the interior surface to model the convective boundary condition. Another note, the Robin condition might come out of the flow solution itself as the differences in concentrations between the electrode surface and bulk can drive diffusion in the domain. DEFINE_SOURCE is hooked to the fluid zones. Inside the macro you need to check for the cells that are next to the interior boundary and impose the sources or sinks there. For the rest of the domain zero sources can be specified. The sources should be added to one side and the negative value of it should be added to the other side to conserve mass. The unit of mass sources are in kg/m3-sec. The flux needs to be converted to that unit to be specified to the cells adjacent to the boundary. |
|
![]() |
![]() |
![]() |
![]() |
#8 | |
Senior Member
|
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
MASOUD
Join Date: Mar 2009
Posts: 102
Rep Power: 16 ![]() |
Well, my case is a Fuel Cell. Attached shows the geometry. The boundary which needs convective mass transfer b.c. is the interface between chanel and electrode which is highlighted.
Unfortunately, I couldn't understand from your reply that I should stick to what Ansys says, or I can use what I have been doing (specified mass fraction derived from the convective b.c.). Please clarify. |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
MASOUD
Join Date: Mar 2009
Posts: 102
Rep Power: 16 ![]() |
Also, how can fixing the mass fraction turn in to convective b.c?
|
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
|
Hi,
Maybe it's better that you clearly specify what you you want to do (the analytic relations or governing eq.s), then I'll try to help you handling it. PS. : fluent have some capabilities and modules in fuel cell modelling. |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Senior Member
MASOUD
Join Date: Mar 2009
Posts: 102
Rep Power: 16 ![]() |
Amir,
Could you send me your email address? I'll drop you a descriptive email then. |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
|
||
![]() |
![]() |
![]() |
![]() |
#14 |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 12 ![]() |
Can anyone tell me what does the C_YI_G mean? Is it applied to indicate the gradient of u? I'm also working on a problem with mixed boundary condition. I'm still confused after reading these.
|
|
![]() |
![]() |
![]() |
![]() |
#15 | |
Senior Member
|
Quote:
Please take a look at the UDF manual for more info... Bests,
__________________
Amir |
||
![]() |
![]() |
![]() |
![]() |
#16 | |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 12 ![]() |
Quote:
I'm trying to build a mixed boundary condition for temperature profile, I used the same code you provided except changing the C_YI_G(c,t0,i) to C_T_G(c,t0),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 |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
mixed inflow/outflow downstream boundary condition question | peob | OpenFOAM Running, Solving & CFD | 3 | February 3, 2017 10:54 |
Cluster ID's not contiguous in compute-nodes domain. ??? | Shogan | FLUENT | 1 | May 28, 2014 15:03 |
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) | cfdonline2mohsen | OpenFOAM | 3 | October 21, 2013 09:28 |
Mixed cell zone remeshing in FLUENT 12 | ChesterP | FLUENT | 6 | November 1, 2011 06:53 |
Mixed Wall Face | abir | FLUENT | 0 | December 13, 2009 12:36 |