Capillary diffusion
Hello everyone!
I am try to add Capillary force to porous media ,I made changes on the basis of CSF.https://www.cfd-online.com/Forums/me...re953-fvol.pngMultiply 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; } |
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 |
Quote:
|
Sorry, I made a mistake, but the reply could not be deleted, so I can only do this.
|
Quote:
|
Quote:
|
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 |
Quote:
|
All times are GMT -4. The time now is 14:29. |