-
Notifications
You must be signed in to change notification settings - Fork 4
Docs/fix lb multicomponent #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ternary-lbm
Are you sure you want to change the base?
Docs/fix lb multicomponent #4
Conversation
|
|
||
| * **film** *thickness* *C1_film* *C2_film*: Creates a horizontal film of specified thickness (as a fraction of the box height) centered in the simulation box with composition C1_film, C2_film, C3_film = 1 - C1_film - C2_film, surrounded by bulk mixture. Small random fluctuations (±0.01) are added to seed phase separation. | ||
|
|
||
| * **mixed_droplet** *radius* *C1_drop* *C2_drop*: Creates a ternary droplet with specified radius and composition (C1_drop, C2_drop, C3_drop = 1 - C1_drop - C2_drop) surrounded by pure C3 solvent. Small random fluctuations (±0.01) are added within the droplet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * **mixed_droplet** *radius* *C1_drop* *C2_drop*: Creates a ternary droplet with specified radius and composition (C1_drop, C2_drop, C3_drop = 1 - C1_drop - C2_drop) surrounded by pure C3 solvent. Small random fluctuations (±0.01) are added within the droplet. | |
| * **mixed_droplet** *radius* *C1_drop* *C2_drop*: Creates a ternary droplet with specified radius and composition (C1_drop, C2_drop, C3_drop = 1 - C1_drop - C2_drop) surrounded by component 3 in bulk. |
|
|
||
| * **mixed_droplet** *radius* *C1_drop* *C2_drop*: Creates a ternary droplet with specified radius and composition (C1_drop, C2_drop, C3_drop = 1 - C1_drop - C2_drop) surrounded by pure C3 solvent. Small random fluctuations (±0.01) are added within the droplet. | ||
|
|
||
| .. math:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .. math:: |
| * **mixed_droplet** *radius* *C1_drop* *C2_drop*: Creates a ternary droplet with specified radius and composition (C1_drop, C2_drop, C3_drop = 1 - C1_drop - C2_drop) surrounded by pure C3 solvent. Small random fluctuations (±0.01) are added within the droplet. | ||
|
|
||
| .. math:: | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| .. math:: | ||
|
|
||
| \text{subNbx} = \frac{N_x}{P_x} + 2h_x \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| \text{subNbx} = \frac{N_x}{P_x} + 2h_x \\ |
| .. math:: | ||
|
|
||
| \text{subNbx} = \frac{N_x}{P_x} + 2h_x \\ | ||
| \text{subNby} = \frac{N_y}{P_y} + 2h_y \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| \text{subNby} = \frac{N_y}{P_y} + 2h_y \\ |
|
|
||
| \text{subNbx} = \frac{N_x}{P_x} + 2h_x \\ | ||
| \text{subNby} = \frac{N_y}{P_y} + 2h_y \\ | ||
| \text{subNbz} = \frac{N_z}{P_z} + 2h_z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| \text{subNbz} = \frac{N_z}{P_z} + 2h_z |
| \text{subNby} = \frac{N_y}{P_y} + 2h_y \\ | ||
| \text{subNbz} = \frac{N_z}{P_z} + 2h_z | ||
|
|
||
| where hₓ = hᵧ = hᵤ = 2 is the halo extent required for gradient and Laplacian calculations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| where hₓ = hᵧ = hᵤ = 2 is the halo extent required for gradient and Laplacian calculations. |
|
|
||
| This fix accepts several internal parameters that control the thermodynamic and transport properties: | ||
|
|
||
| * **tau_r**, **tau_p**, **tau_s**: Relaxation times for momentum transport and order parameter transport. These control the viscosity and diffusivity of the fluid components. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * **tau_r**, **tau_p**, **tau_s**: Relaxation times for momentum transport and order parameter transport. These control the viscosity and diffusivity of the fluid components. | |
| * **tau_r**, **tau_p**, **tau_s**: Relaxation times for momentum transport and order parameter transport. |
|
|
||
| * **tau_r**, **tau_p**, **tau_s**: Relaxation times for momentum transport and order parameter transport. These control the viscosity and diffusivity of the fluid components. | ||
|
|
||
| * **gamma_p**, **gamma_s**: Mobility coefficients controlling the rate of change of the phase variables φ and ψ. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * **gamma_p**, **gamma_s**: Mobility coefficients controlling the rate of change of the phase variables φ and ψ. | |
| * **gamma_p**, **gamma_s**: Parameters controlling the mobility of the phases $\phi$ and $\psi$. |
|
|
||
| .. math:: | ||
|
|
||
| \gamma_{mn} = \frac{\sqrt{(\kappa_m + \kappa_n)(\lambda_m + \lambda_n)}}{6} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| \gamma_{mn} = \frac{\sqrt{(\kappa_m + \kappa_n)(\lambda_m + \lambda_n)}}{6} | |
| \gamma_{mn} = \frac{\alpha}{6}\left(\kappa_m + \kappa_n\right) |
|
|
||
| \gamma_{mn} = \frac{\sqrt{(\kappa_m + \kappa_n)(\lambda_m + \lambda_n)}}{6} | ||
|
|
||
| * **alpha**: Gradient energy coefficient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * **alpha**: Gradient energy coefficient. | |
| * **alpha**: Parameter correlated with the interface width in LB units. The interface width is given by 4*alpha. |
| The *dumpxdmf* keyword enables output of the fluid fields to files that can be visualized using Paraview or other XDMF-compatible visualization software. The output includes: | ||
|
|
||
| * Density field ρ (converted to physical units) | ||
| * Order parameters φ and ψ (converted to physical units) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Order parameters φ and ψ (converted to physical units) | |
| * Order parameters \phi and \psi |
|
|
||
| The *dumpxdmf* keyword enables output of the fluid fields to files that can be visualized using Paraview or other XDMF-compatible visualization software. The output includes: | ||
|
|
||
| * Density field ρ (converted to physical units) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Density field ρ (converted to physical units) | |
| * Density field ρ |
|
|
||
| * Density field ρ (converted to physical units) | ||
| * Order parameters φ and ψ (converted to physical units) | ||
| * Pressure field p (converted to physical units) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Pressure field p (converted to physical units) | |
| * Pressure field p |
| * Density field ρ (converted to physical units) | ||
| * Order parameters φ and ψ (converted to physical units) | ||
| * Pressure field p (converted to physical units) | ||
| * Velocity field **u** (converted to physical units) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Velocity field **u** (converted to physical units) | |
| * Velocity vector field **u** |
|
|
||
| **Output** | ||
|
|
||
| The *dumpxdmf* keyword enables output of the fluid fields to files that can be visualized using Paraview or other XDMF-compatible visualization software. The output includes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The *dumpxdmf* keyword enables output of the fluid fields to files that can be visualized using Paraview or other XDMF-compatible visualization software. The output includes: | |
| The *dumpxdmf* keyword enables output of the fluid fields to files that can be visualized using Paraview or other XDMF-compatible visualization software. The output (in LB units) includes: |
| * A text .xdmf file containing metadata and grid structure | ||
| * A binary .raw file containing the actual field data | ||
|
|
||
| The concentration fields can be recovered from the output using: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The concentration fields can be recovered from the output using: |
|
|
||
| .. math:: | ||
|
|
||
| C_1 = \frac{\rho + \phi}{2}, \quad C_2 = \frac{\rho - \phi}{2}, \quad C_3 = \psi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| C_1 = \frac{\rho + \phi}{2}, \quad C_2 = \frac{\rho - \phi}{2}, \quad C_3 = \psi |
|
|
||
| The concentration fields can be recovered from the output using: | ||
|
|
||
| .. math:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .. math:: |
|
|
||
| **Boundary Conditions** | ||
|
|
||
| The ternary lattice-Boltzmann implementation currently supports periodic boundary conditions in all three directions. The boundary conditions are specified through the main LAMMPS :doc:`boundary <boundary>` command and must be set to periodic (p p p) for proper operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The ternary lattice-Boltzmann implementation currently supports periodic boundary conditions in all three directions. The boundary conditions are specified through the main LAMMPS :doc:`boundary <boundary>` command and must be set to periodic (p p p) for proper operation. | |
| The ternary lattice-Boltzmann implementation currently only supports periodic boundary conditions in all three directions. The boundary conditions are specified through the main LAMMPS :doc:`boundary <boundary>` command and must be set to periodic (p p p) for proper operation. |
|
|
||
| The ternary lattice-Boltzmann implementation currently supports periodic boundary conditions in all three directions. The boundary conditions are specified through the main LAMMPS :doc:`boundary <boundary>` command and must be set to periodic (p p p) for proper operation. | ||
|
|
||
| *Periodic Boundaries* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| *Periodic Boundaries* |
|
|
||
| *Periodic Boundaries* | ||
|
|
||
| With periodic boundary conditions, the fluid domain wraps around in all directions. The distribution functions that stream out of one side of the simulation box re-enter from the opposite side. This is handled automatically through the MPI communication scheme, which includes a halo region of 2 lattice layers on each side of the local processor subdomain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| With periodic boundary conditions, the fluid domain wraps around in all directions. The distribution functions that stream out of one side of the simulation box re-enter from the opposite side. This is handled automatically through the MPI communication scheme, which includes a halo region of 2 lattice layers on each side of the local processor subdomain. |
|
|
||
| With periodic boundary conditions, the fluid domain wraps around in all directions. The distribution functions that stream out of one side of the simulation box re-enter from the opposite side. This is handled automatically through the MPI communication scheme, which includes a halo region of 2 lattice layers on each side of the local processor subdomain. | ||
|
|
||
| The halo communication ensures that: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The halo communication ensures that: |
| *Periodic Boundaries* | ||
|
|
||
| With periodic boundary conditions, the fluid domain wraps around in all directions. The distribution functions that stream out of one side of the simulation box re-enter from the opposite side. This is handled automatically through the MPI communication scheme, which includes a halo region of 2 lattice layers on each side of the local processor subdomain. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| The halo communication ensures that: | ||
|
|
||
| * Gradient calculations (∇ρ, ∇φ, ∇ψ) required for the chemical potentials can be performed correctly near subdomain boundaries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Gradient calculations (∇ρ, ∇φ, ∇ψ) required for the chemical potentials can be performed correctly near subdomain boundaries |
| The halo communication ensures that: | ||
|
|
||
| * Gradient calculations (∇ρ, ∇φ, ∇ψ) required for the chemical potentials can be performed correctly near subdomain boundaries | ||
| * Laplacian calculations (∇²ρ, ∇²φ, ∇²ψ) have access to necessary neighbor information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Laplacian calculations (∇²ρ, ∇²φ, ∇²ψ) have access to necessary neighbor information |
|
|
||
| * Gradient calculations (∇ρ, ∇φ, ∇ψ) required for the chemical potentials can be performed correctly near subdomain boundaries | ||
| * Laplacian calculations (∇²ρ, ∇²φ, ∇²ψ) have access to necessary neighbor information | ||
| * Streaming of distribution functions across processor boundaries is handled correctly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * Streaming of distribution functions across processor boundaries is handled correctly |
akgokulraman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the following changes
Co-authored-by: Gokul Raman <[email protected]>
Co-authored-by: Gokul Raman <[email protected]>
Adds new documentation file fix_lb_multicomponent.rst describing the ternary lattice Boltzmann model implemented in fix_lb_multicomponent.cpp.
This fix extends fix_lb_fluid to support three-component mixtures, following the work by Arumugam Kumar et al. (2024).
Related Issue(s)
N/A – new documentation entry for existing code developed under Schiller Lab.
Author(s)
Rasib Zaman ([email protected]
), Schiller Lab – University of Delaware
Licensing
I agree that my contribution will be included in LAMMPS and redistributed under GPL v2 / LGPL v2.1.
Backward Compatibility
No changes to code or input behavior — documentation only.
Implementation Notes
Documentation tested with the LAMMPS Sphinx build system and formatted consistently with existing fix_lb_fluid.rst.
Post Submission Checklist
Documentation is still in progress
Licensing information is complete
The doc file builds correctly with the LAMMPS documentation system