Processing math: 100%

Sunday, July 15, 2012

EVA: Solve Cahn-Hilliard equations with the dynamic boundary condition


Purpose
  • The package "Eva" simulates the 2-D isotropic Cahn-Hilliard equation with the dynamic boundary condition. A Legendre-Fourier method was used for the spatial discretization (periodic in x and nonperiodic in y), and the first- and second-order energy stabilized methods were used for the temporal discretization.

Specifications
  • Name: Eva.
  • Author: Feng Chen.
  • Finishing date: 07/15/2012.
  • Languages: Fortran 90.
  • Required libraries: BLAS, LAPACK.

Simple Example
  • Equation: ϕt=MΔμ,in Ω,μ=ϕ(ϕ21)ϵϵΔϕ,in Ω,nμ=0,on Ω,ϕt=ν(ϵnϕ+γ(ϕ)),on Ω,
    where γ(ϕ)=23cosθsin(π2ϕ),
  • Parameters: Ω=(0,1)×(0,1),M=0.03,ϵ=0.02,ν=500,θ±=±77.6π/180,nx=128,ny=128,δt=0.001,T=0.8,s1=1.5,s2=0.125.
  • Exact solution and input functions: ϕ(x,y,0)=two separated semi-circles on the bottom boundary
    with radius 0.2. It is evolved through the second-order scheme.

Quick Start
  • Compiling and running:
    cd ./Eva
    make library
    gfortran Eva_Main.cu -llibrary -llapack -lblas
    ./a.out
    
  • Output:
     
    The top row is from the homogeneous Neumann boundary condition, while the bottom from the dynamic boundary condition.
    
    
    
  • CPU: Intel(R) Xeon(R) CPU X5550 @2.67GHz.
  • OS: CentOS release 6.4 (Final).
  • Compiler: gfortran 4.5.1.

References
Code Highlights
    
    !! solve for phi and mu at each time step
    call IonPhotonSpace_Transform_D2_Many(2, EvaSI, EvaSP, &
        EW%up(:,:,:,co), EW%us, IonPhotonP2S)
    call IonQuarkSpace_Solve(EvaSI, EvaSQ(co), EW%fd, EW%us) 
    call IonPhotonSpace_Transform_D2_Many(2, EvaSI, EvaSP, &
        EW%us, EW%up(:,:,:,co), IonPhotonS2P)           
    
    

No comments:

Post a Comment