# Interface intf = Interface(domain1=mart, domain2=aust, type_int='fixed.balance') log = SimulationLog(basename) log.set_domains([('mart', mart), ('aust', aust)]) log.set_interfaces([('intf', intf)]) log.set_conditions(c0, T_C, total_time, n_time) log.initialize(False) for i in control_itsteps.itlist: if i in control_itsteps.itstepi and i > 0: control_itsteps.next_itstep() dt = control_itsteps.dt mart.dt = dt aust.dt = dt # Calculates interfacial compositions intf.comp(c0) # FDM iteration step mart.FDM_implicit(bcn=(1., 0, 0, intf.ci_bcc)) aust.FDM_implicit(bc0=(1., 0, 0, intf.ci_fcc)) # Update grid information mart.update_grid(i) aust.update_grid(i) # Print info relative to the iteration step log.printit(i, each)
j, fer1_diss = -1, False log = SimulationLog(basename) log.set_domains([('mart', mart), ('aus1', aus1), ('fer1', fer1), ('aus2', aus2), ('fer2', fer2)]) log.set_interfaces([('int1', int1), ('int2', int2), ('int4', int4), ('int4', int4)]) log.set_conditions(c0, T_C, total_time, n_time) log.initialize(False) for i in control_itsteps.itlist: if i in control_itsteps.itstepi and i > 0: control_itsteps.next_itstep() dt = control_itsteps.dt mart.dt = dt aus1.dt = dt fer1.dt = dt aus2.dt = dt fer2.dt = dt try: if not fer1_diss: # interface velocities at the mobile interfaces int1.comp(poly_deg=2) int2.v = 1e6 * int2.chem_driving_force() * int2.M() / fer1.Vm int2.comp(poly_deg=2) int3.v = 1e6 * int3.chem_driving_force() * int3.M() / fer1.Vm int3.comp(poly_deg=2) int4.v = 1e6 * int4.chem_driving_force() * int4.M() / fer2.Vm int4.comp(poly_deg=2)