psi_, mu_, nu_, nuhat_ = df.split(u_) psi_1, mu_1, nu_1, nuhat_1 = df.split(u_1) # Create intial conditions if parameters["restart_folder"] is None: u_init = CircularStripedIC(u_, degree=1) # u_init = RandomIC(u_, degree=1) # u_init = AroundStripedIC(u_, degree=1) # u_init = AlongStripedIC(u_, degree=1) # u_init = MMSIC(u_, geo_map, degree=1) u_1.interpolate(u_init) u_.assign(u_1) else: load_checkpoint(parameters["restart_folder"], u_, u_1) w = QuarticPotential() # Define the functional form of the reduced temperature (if # non-uniforum temperature desired) tau_h = 3 # High temperature (parameter) rh = 4*R/5 # Radius where temperature shifts k = 1/100 # Temperature shift rate taufunction = df.Expression( 'tau + (tauh-tau)/(1 + exp(-k*(x[0]*x[0]+x[1]*x[1]-rh*rh ) ) )', k=k, tau=tau, tauh=tau_h, rh=rh, degree=2) # Choose between uniform (tau) or non-uniform (taufunction) reduced # temperature: dw_lin = w.derivative_linearized(psi, psi_1, taufunction) # dw_lin = w.derivative_linearized(psi, psi_1, tau)
# Create intial conditions if parameters["restart_folder"] is None: init_mode = parameters["init_mode"] if init_mode == "random": u_init = RandomIC(u_, amplitude=1e-1, degree=1) elif init_mode == "striped": u_init = StripedIC(u_, alpha=parameters["alpha"]*np.pi/180.0, degree=1) else: exit("No init_mode set.") u_1.interpolate(u_init) u_.assign(u_1) else: load_checkpoint(parameters["restart_folder"], u_, u_1) w = QuarticPotential() #dw_lin = w.derivative_linearized(psi, psi_1, tau) dw_stab = w.derivative_stab(psi_, psi_1, tau) # Define some UFL indices: i, j, k, l = ufl.Index(), ufl.Index(), ufl.Index(), ufl.Index() # Brazovskii-Swift (conserved PFC with dc/dt = grad^2 delta F/delta c) m_NL = F_psi_NL = (1 + geo_map.K * h**2/12) * dw_stab * xi m_0 = (4 * nu_ * xi - 4 * geo_map.gab[i, j]*nu_.dx(i)*xi.dx(j)) m_2 = (2 * (geo_map.H * nuhat_ - geo_map.K*nu_)*xi - 4 * geo_map.Kab[i, j]*nuhat_.dx(i)*xi.dx(j) + 5 * geo_map.K * geo_map.gab[i, j]*nu_.dx(i)*xi.dx(j) - 2 * geo_map.H * (geo_map.gab[i, j]*nuhat_.dx(i)*xi.dx(j)
if parameters["restart_folder"] is None: init_mode = parameters["init_mode"] if init_mode == "random": u_init = RandomIC(u_, amplitude=1e-1, degree=1) elif init_mode == "striped": u_init = StripedIC(u_, alpha=parameters["alpha"] * np.pi / 180.0, degree=1) else: exit("No init_mode set.") u_1.interpolate(u_init) u_.assign(u_1) else: load_checkpoint(parameters["restart_folder"], u_, u_1) w = QuarticPotential() # Define the functional form of the reduced temperature (if non-uniforum temperature desired) tau_h = 3 # High temperature (parameter) rh = 4 * R / 5 # Radius where temperature shifts k = 1 / 100 # Temperature shift rate #taufunction = df.Expression('tau + (tauh-tau)/(1 + exp(-k*(x[0]*x[0]+x[1]*x[1]-rh*rh ) ) )', k=k, tau=tau, tauh=tau_h, rh=rh, degree=2) taufunction = tau # Choose between uniform (tau) or non-uniform (taufunction) reduced temperature: dw_lin = w.derivative_linearized(psi, psi_1, taufunction) #dw_lin = w.derivative_linearized(psi, psi_1, tau) #dw_lin = w.derivative_linearized(psi, psi_1, tau) dw_stab = w.derivative_stab(psi_, psi_1, taufunction)