Dear Dr. Shyam Sunder Yadav,
I think the idea of your first approach is correct, but the way it is implemented in Basilisk is incomplete.
In Basilisk, manually assigning a ghost value with foreach_boundary() does not register a boundary condition for the scalar. Once phi[] is modified, the field is marked as dirty. If a later stencil requires neighboring values, Basilisk may automatically call boundary_internal() and reconstruct the ghost cells using the boundary condition registered for phi. If no wetting condition has been registered, the default homogeneous Neumann condition may therefore overwrite the ghost value you assigned manually.
So I would suggest registering the nonlinear Neumann condition directly, for both the main field and the RK intermediate field:
#define wetting_Lambda \Then Basilisk's automatic boundary updates will regenerate the required wetting ghost values consistently.
Your second approach appears to work because it modifies the first interior cell rather than the ghost cell. Automatic ghost-cell updates cannot undo this modification. However, this is no longer the original Neumann boundary condition: it overwrites the interior PDE solution and may also spoil conservation.
If higher accuracy at the wall is required, one can instead use the wall value \phi_w \simeq \frac{\phi_P+\phi_G}{2} in the nonlinear wetting condition and solve locally for the ghost value, but I would first test the registered Neumann implementation above.
Best regards,
--
You received this message because you are subscribed to the Google Groups "basilisk-fr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to basilisk-fr...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/basilisk-fr/04d991b0-4cb9-4c7b-a699-bbbe98907e18n%40googlegroups.com.
Dear Dr. Shyam Sunder Yadav,
I did a simple test, and the contact-angle boundary condition seems to work. However, whether this treatment is physically correct still needs to be checked.
The problem is not caused by the homogeneous Neumann condition. It comes from the definition
#define EPSILON 3.0*L0/256.0which should be changed to
#define EPSILON (3.0*L0/256.0)Without the parentheses, expressions such as 4.0/EPSILON are expanded incorrectly.
Best regards,
Peng
To view this discussion visit https://groups.google.com/d/msgid/basilisk-fr/4e1f9180-7f17-4e34-8362-a958c0c65a85n%40googlegroups.com.