An Efficient Computational Algorithm for the Nonlocal Cahn–Hilliard Equation with a Space-Dependent Parameter
Abstract
:1. Introduction
2. Numerical Method
3. Computational Tests
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A. MATLAB Program for the Proposed Method
Listing A1. MATLAB program. |
clear; % Clear all variables from the workspace % Set grid parameters Nx = 500; Ny = Nx; % Number of grid points in x and y directions hx = 0.03; hy = hx; % Grid spacing in x and y directions Lx = hx ∗ Nx; Ly = hy ∗ Ny; % Physical domain size in x and y % Generate spatial grids (cell-centered) x = linspace (0.5∗hx, Lx − 0.5∗hx, Nx); y = linspace (0.5∗hy, Ly − 0.5∗hy, Ny)’; % Define model parameters epsilon = hx; % Interfacial width parameter Cahn = epsilon^2; % Coefficient for Cahn-Hilliard diffusion alpha = 100; % Source term scaling parameter % Generate 2D spatial mesh [xx, yy] = meshgrid(x(1:end), y(1:end)); % Initialize average phase field aveM and perturbed field v for i = 1:Nx for j = 1:Ny % Define average phase field aveM with circular interface if Lx/3 − sqrt((Lx/2 − x(i))^2 + (Ly/2 - y(j))^2) < 0 aveM(i,j) = −0.3; % Outside the circle else aveM(i,j) = 0; % Inside the circle end % Add random perturbation to aveM v(i,j) = 0.5 ∗ (0.5−rand(1)) + aveM(i,j); end end % Define Fourier wave numbers for spectral derivatives kx = 2∗pi/Lx ∗ fftshift(−Nx/2:Nx/2−1); % Fourier modes in x ky = 2∗pi/Ly ∗ fftshift(−Ny/2:Ny/2−1)’; % Fourier modes in y % Compute squared wave numbers for Laplacian and bi-Laplacian operators k2x = −kx.^2; k2y = −ky.^2; [kxxt, kyyt] = meshgrid(k2x, k2y); kxx = kxxt’; kyy = kyyt’; % Set time integration parameters dt = 0.1; T = 50; Nt = round(T/dt); % Total number of time steps ns = Nt / 10; % Interval for visualization % Time integration loop for n = 1:Nt % Compute FFT of the right-hand side including source term v_hat = fft2(v + dt ∗ alpha ∗ aveM); vf = fft2(v.^3 - 3∗v); % Nonlinear term in Fourier space % Compute denominator in semi-implicit update formula deno = (1.0+dt∗alpha-dt∗2∗(kxx+kyy)+dt∗Cahn∗(kxx+kyy).^2); % Semi-implicit update in Fourier space vnew = (v_hat + dt ∗ (kxx + kyy) .∗ vf) ./ deno; % Transform back to physical space v = real(ifft2(vnew)); % Visualization every ns time steps if (mod(n, ns) == 0) figure (1); vv = v; vv(1,1)=−1; vv(end,end)= 1; % Normalize extrema for visualization surf(xx, yy, −vv’); % Plot the negative of v shading interp; colormap gray; % Smooth shading and grayscale colormap view (0,90); axis image; % Top-down view, equal axis scaling drawnow; % Update the figure window pause (0.01); % Brief pause for rendering end end |
References
- Solano-López, P.; Saavedra, J.; Molina, R. Exploratory Study of a Green Function Based Solver for Nonlinear Partial Differential Equations. Algorithms 2024, 17, 564. [Google Scholar] [CrossRef]
- Daribayev, B.; Mukhanbet, A.; Azatbekuly, N.; Imankulov, T. A Quantum Approach for Exploring the Numerical Results of the Heat Equation. Algorithms 2024, 17, 327. [Google Scholar] [CrossRef]
- Singh, R.; Kumar, S. Lie Symmetry Analysis, Closed-Form Solutions and Dynamics for the Kinetics of Phase Separation in Iron (Fe–Cr–X (X = Mo, Cu)) Based on Ternary Alloys. Nonlinear Dyn. 2024, 112, 20255–20267. [Google Scholar] [CrossRef]
- Abazari, R.; Rezazadeh, H.; Akinyemi, L.; Inc, M. Numerical Simulation of a Binary Alloy of 2D CahnHilliard Model for Phase Separation. Comput. Appl. Math. 2022, 41, 389. [Google Scholar] [CrossRef]
- Martínez-Agustín, F.; Ruiz-Salgado, S.; Zenteno-Mateo, B.; Rubio, E.; Morales, M.A. 3D Pattern Formation from Coupled Cahn–Hilliard and Swift–Hohenberg Equations: Morphological Phases Transitions of Polymers, Bock and Diblock Copolymers. Comput. Mater. Sci. 2022, 210, 111431. [Google Scholar] [CrossRef]
- Garcke, H.; Kovács, B.; Trautwein, D. Viscoelastic Cahn–Hilliard Models for Tumor Growth. Math. Models Methods Appl. Sci. 2022, 32, 2673–2758. [Google Scholar] [CrossRef]
- Inguva, P.K.; Walker, P.J.; Yew, H.W.; Zhu, K.; Haslam, A.J.; Matar, O.K. Continuum-Scale Modelling of Polymer Blends Using the Cahn–Hilliard Equation: Transport and Thermodynamics. Soft Matter 2021, 17, 5645–5665. [Google Scholar] [CrossRef]
- Zhang, T.; Zhong, J.; Zhang, L. Multi-Objective Optimization Assisting Three-Dimensional Quantitative Cahn–Hilliard Simulations of Microstructure Evolution in Fe–Cr Alloys During Spinodal Decomposition. Comput. Mater. Sci. 2024, 244, 113260. [Google Scholar] [CrossRef]
- Mandolesi, B.; Iandiorio, C.; Belardi, V.G.; Vivio, F. Spinodal Decomposition-Inspired Metamaterial: Tailored Homogenized Elastic Properties via the Dimensionless Cahn–Hilliard Equation. Eur. J. Mech. A Solids 2025, 112, 105615. [Google Scholar] [CrossRef]
- Frohoff-Hülsmann, T.; Thiele, U. Nonreciprocal Cahn–Hilliard Model Emerges as a Universal Amplitude Equation. Phys. Rev. Lett. 2023, 131, 107201. [Google Scholar] [CrossRef]
- Zhiliakov, A.; Wang, Y.; Quaini, A.; Olshanskii, M.; Majd, S. Experimental Validation of a Phase-Field Model to Predict Coarsening Dynamics of Lipid Domains in Multicomponent Membranes. Biochim. Biophys. Acta Biomembr. 2021, 1863, 183446. [Google Scholar] [CrossRef]
- Novak, A.; Reinić, N. Shock Filter as the Classifier for Image Inpainting Problem Using the Cahn–Hilliard Equation. Comput. Math. Appl. 2022, 123, 105–114. [Google Scholar] [CrossRef]
- Li, L. On a Cahn–Hilliard–Oono Model for Image Segmentation. Asymptot. Anal. 2023, 132, 519–548. [Google Scholar] [CrossRef]
- Li, X.; Qiao, Z.; Wang, C. Stabilization Parameter Analysis of a Second-Order Linear Numerical Scheme for the Nonlocal Cahn–Hilliard Equation. IMA J. Numer. Anal. 2023, 43, 1089–1114. [Google Scholar] [CrossRef]
- Burkovska, O.; Gunzburger, M. On a Nonlocal Cahn-Hilliard Model Permitting Sharp Interfaces. Math. Models Methods Appl. Sci. 2021, 31, 1749–1786. [Google Scholar] [CrossRef]
- Xue, Z.; Zhai, S.; Zhao, X. Energy Dissipation and Evolutions of the Nonlocal Cahn-Hilliard Model and Space Fractional Variants Using Efficient Variable-Step BDF2 Method. J. Comput. Phys. 2024, 510, 113071. [Google Scholar] [CrossRef]
- Li, X.; Qiao, Z.; Wang, C. Convergence Analysis for a Stabilized Linear Semi-Implicit Numerical Scheme for the Nonlocal Cahn-Hilliard Equation. Math. Comput. 2021, 90, 171–188. [Google Scholar] [CrossRef]
- Liu, Z.; Li, X. The Fast Scalar Auxiliary Variable Approach with Unconditional Energy Stability for Nonlocal Cahn–Hilliard Equation. Numer. Methods Partial Differ. Equ. 2021, 37, 244–261. [Google Scholar] [CrossRef]
- Zhou, Q.; Sun, Y. Energy Stability of Exponential Time Differencing Schemes for the Nonlocal Cahn–Hilliard Equation. Numer. Methods Partial Differ. Equ. 2023, 39, 4030–4058. [Google Scholar] [CrossRef]
- Starn, J. A Simple Fluid Solver Based on the FFT. J. Graph. Tools 2001, 6, 43–52. [Google Scholar] [CrossRef]
- Durdiev, D.; Wendler, F. An Effective Fourier Spectral Phase-Field Approach for Ferroelectric Materials. Comput. Mater. Sci. 2023, 218, 111928. [Google Scholar] [CrossRef]
- Zhang, P.; Jia, J.; Jiang, X. Time-Splitting Fourier Spectral Method for Two-Dimensional Space Fractional Schrödinger-Poisson-Xα model. Appl. Math. Lett. 2025, 170, 109610. [Google Scholar] [CrossRef]
- Pindza, E.; Owolabi, K.M. Fourier Spectral Method for Higher Order Space Fractional Reaction–Diffusion Equations. Commun. Nonlinear Sci. Numer. Simul. 2016, 40, 112–128. [Google Scholar] [CrossRef]
- Pareschi, L.; Perthame, B. A Fourier Spectral Method for Homogeneous Boltzmann Equations. Transp. Theory Stat. Phys. 1996, 25, 369–382. [Google Scholar] [CrossRef]
- Zheng, N.; Li, X. Error Analysis of the SAV Fourier-Spectral Method for the Cahn–Hilliard–Hele–Shaw System. Adv. Comput. Math. 2021, 47, 1–27. [Google Scholar] [CrossRef]
- Cai, Z.; Lin, B.; Lin, M. A Positive and Moment-Preserving Fourier Spectral Method. SIAM J. Numer. Anal. 2024, 62, 273–294. [Google Scholar] [CrossRef]
- Nishiura, Y.; Ohnishi, I. Some Mathematical Aspects of the Micro-Phase Separation in Diblock Copolymers. Phys. D Nonlinear Phenom. 1995, 84, 31–39. [Google Scholar] [CrossRef]
- Kim, J. Modified Wave-Front Propagation and Dynamics Coming from Higher-Order Double-Well Potentials in the Allen–Cahn Equations. Mathematics 2024, 12, 3796. [Google Scholar] [CrossRef]
- Choi, J.; Ham, S.; Kwak, S.; Hwang, Y.; Kim, J. Stability Analysis of an Explicit Numerical Scheme for the Allen–Cahn Equation with High-Order Polynomial Potentials. AIMS Math. 2024, 9, 19332–19344. [Google Scholar] [CrossRef]
- Lee, G.; Lee, S. Study on Decoupled Projection Method for Cahn–Hilliard Equation. J. KSIAM 2023, 27, 272–280. [Google Scholar] [CrossRef]
- Ju, L.; Li, X.; Qiao, Z. Fully discrete Fourier spectral schemes for a nonlocal Cahn–Hilliard equation. IMA J. Numer. Anal. 2021, 41, 1246–1275. [Google Scholar] [CrossRef]
- Eyre, D.J. An Unconditionally Stable One-Step Scheme for Gradient Systems. Unpubl. Manuscr. 1998, 6. Available online: http://www.math.utah.edu/~eyre/research/methods/ch_numer.ps (accessed on 16 April 2020).
- Hwang, Y.; Ham, S.; Lee, H.G.; Kim, H.; Kim, J. Numerical Algorithms for the Phase-Field Models Using Discrete Cosine Transform. Mech. Res. Commun. 2024, 139, 104305. [Google Scholar] [CrossRef]
- Kim, J. Influence of Fractional Order on the Behavior of a Normalized Time-Fractional SIR Model. Mathematics 2024, 12, 3081. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, Z.; Wu, X.; Kim, J. An Efficient Computational Algorithm for the Nonlocal Cahn–Hilliard Equation with a Space-Dependent Parameter. Algorithms 2025, 18, 365. https://doi.org/10.3390/a18060365
Li Z, Wu X, Kim J. An Efficient Computational Algorithm for the Nonlocal Cahn–Hilliard Equation with a Space-Dependent Parameter. Algorithms. 2025; 18(6):365. https://doi.org/10.3390/a18060365
Chicago/Turabian StyleLi, Zhengang, Xinpei Wu, and Junseok Kim. 2025. "An Efficient Computational Algorithm for the Nonlocal Cahn–Hilliard Equation with a Space-Dependent Parameter" Algorithms 18, no. 6: 365. https://doi.org/10.3390/a18060365
APA StyleLi, Z., Wu, X., & Kim, J. (2025). An Efficient Computational Algorithm for the Nonlocal Cahn–Hilliard Equation with a Space-Dependent Parameter. Algorithms, 18(6), 365. https://doi.org/10.3390/a18060365