|
[Sponsors] |
Defining source terms at the wall located between two fluids |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 12, 2017, 09:10 |
Defining source terms at the wall located between two fluids
|
#1 |
Member
ehsan
Join Date: Sep 2014
Posts: 38
Rep Power: 12 |
Dear all,
I have tried to define source terms on a wall (which is a BC with zero thickness and located between two fluids) using F_C0 and F_C1 but the results are strange. I mean I want to have a fixed value of 500 on the top and -500 on the other side of the wall, but what I get is a range of [0 500] on the top and [-500 0] on the downside at two adjacent mesh cells (I need to define source terms on the very first mesh cells at the wall)! Any help and suggestions are appreciated (or any alternative ways to define source terms). My UDF code: #include "udf.h" DEFINE_ADJUST(a_source,domain) { Domain *d; face_t f; cell_t c; Thread *t; cell_t c0; Thread *t0; cell_t c1; Thread *t1; real source=500; real sink=-500; d = Get_Domain(1); /* it should be defined to point to the mixture level */ t = Lookup_Thread(d,3); /* the wall ID is 3 */ begin_f_loop(f,t) { c0 = F_C0(f,t); /* wall-up side */ t0 = THREAD_T0(t); c1 = F_C1(f,t); /* wall-down side : t1 = THREAD_T1(t); C_UDMI(c0,t0,0)= source; C_UDMI(c1,t1,1)= sink; } end_f_loop(f,t) } Last edited by e_cfd; December 15, 2017 at 10:43. |
|
December 15, 2017, 10:43 |
|
#2 |
Member
ehsan
Join Date: Sep 2014
Posts: 38
Rep Power: 12 |
Any suggestion??
|
|
December 17, 2017, 21:11 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
I guess you have 2 elements wide wall?
This range is interpolation of cfd-viewer. You may try this see true picture: results -> graphics -> contours -> switch off node values -> OK Best regards |
|
December 18, 2017, 10:14 |
|
#4 |
Member
ehsan
Join Date: Sep 2014
Posts: 38
Rep Power: 12 |
Dear Alexander,
Thank you for your help. Yes you are right about the nodal values. P. S. : my wall has zero thickness, and if I am not mistaken, C0 and C1 are adjacent fluid elements. Best regards, |
|
Tags |
source term, udf, wall |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 15:30 |
Natural convection in a closed domain STILL NEEDING help! | Yr0gErG | FLUENT | 4 | December 2, 2019 01:04 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |