|
[Sponsors] |
February 26, 2019, 04:57 |
Capillary diffusion
|
#1 |
New Member
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 7 |
Hello everyone!
I am try to add Capillary force to porous media ,I made changes on the basis of CSF.Multiply the volume fraction by Fvol,then add into the source term of each phase.The results show an increase in pressure but no change in liquid volume fraction.The capillary dispersion is not happen.I don't know why? Is my udf wrong.if you can tell me something,i will vervy thank you. part of udf DEFINE_ADJUST(adjust_gradient1, domain) { Thread *t; cell_t c; domain = Get_Domain(2); /* Fill UDS with the variable. */ thread_loop_c(t, domain) { begin_c_loop(c, t) { C_UDSI(c, t, 0) = C_VOF(c, t); C_UDMI(c, t, 4) = C_UDSI(c, t, 0); } end_c_loop(c, t) } } DEFINE_ON_DEMAND(store_gradient1) { Domain *domain; cell_t c; Thread *t; domain = Get_Domain(2); /* Fill the UDM with magnitude of gradient. */ thread_loop_c(t, domain) { begin_c_loop(c, t) { C_UDMI(c, t, 5) = NV_MAG(C_UDSI_G(c, t, 0)); } end_c_loop(c, t) } } DEFINE_SOURCE(gas_phase_xmom_source, cell, t, dS, eqn) { real sigma, ttt, dp, a, dmin, Fvol, source; cell_t c; dp = 0.0016; ttt = sqrt(3) / 3.14159 - 0.5; dmin = sqrt(ttt)*dp; a=C_UDMI(c, t, 9); sigma = 0.07275 * 2 * pow(a, 0.33333)*1.108117; Fvol = C_UDMI(c, t, 4) * sigma*(C_UDMI(c, t, 4)*1.225*dmin*C_UDMI(c, t, 5) + C_UDMI(c, t, 8)*998.2*dp*C_UDMI(c, t, 7)) / 0.5 / (998.2 + 1.225); source = - Fvol; dS[eqn] = 0; return source; } |
|
February 26, 2019, 08:16 |
|
#2 |
Member
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 9 |
Dear Wuming,
Did you check if all the UDMs you are using in Fvol are defined and have values that are different from zero ? Did you define the store_gradient1 deliberately as a DEFINE_ON_DEMAND function ? This means that the gradient of your UDS is going to be store only if you manually run the store_gradient1 function in post-processing. Best regards, Annan |
|
February 26, 2019, 09:22 |
|
#3 | |
New Member
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 7 |
Quote:
|
||
February 27, 2019, 21:37 |
|
#4 |
New Member
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 7 |
Sorry, I made a mistake, but the reply could not be deleted, so I can only do this.
|
|
February 27, 2019, 21:39 |
|
#5 |
New Member
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 7 |
I know what you talk,the gradient is not change when case calculation,so how i should modify the udf,can make me get gradient of the Volume fraction,thank you
|
|
February 27, 2019, 21:42 |
|
#6 | |
New Member
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 7 |
Quote:
|
||
February 27, 2019, 22:28 |
|
#7 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
Fvol = C_UDMI(c, t, 4) * sigma*(C_UDMI(c, t, 4)*1.225*dmin*C_UDMI(c, t, 5) + C_UDMI(c, t, 8)*998.2*dp*C_UDMI(c, t, 7)) / 0.5 / (998.2 + 1.225); C_UDMI(c, t, 5) C_UDMI(c, t, 7) C_UDMI(c, t, 8) are they defined? where? best regards |
|
February 27, 2019, 22:44 |
|
#8 | |
New Member
wuming
Join Date: Nov 2018
Posts: 26
Rep Power: 7 |
Quote:
|
||
Tags |
udf capillary force |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Harmonic average of Diffusion Tensors in Finite Volume Method | Yurie_Breschnef | Main CFD Forum | 4 | September 6, 2018 05:51 |
Diffusion in Porous Media | kdep | FLUENT | 1 | March 28, 2016 17:50 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
[ANSYS Meshing] Issue with modeling dynamic capillary rise in a capillary tube | cp703 | ANSYS Meshing & Geometry | 13 | March 22, 2013 21:11 |
How to stop diffusion and advection in a zone for selected species. | hda | FLUENT | 0 | March 19, 2012 00:59 |