import rpmClass_Stable as rpm import numpy as np import math import os import matplotlib.pyplot as plt import seaborn as sns import re import pandas as pd from importlib import * #Package to update the version of rpmClass_Stable reload(rpm) sns.set_style("ticks") sns.set_palette("bright") Lattice = rpm.ASI_RPM(1, 1) #folder = r'D:\RPM_Rapid\SquarePeriodDouble\PeriodDoublingData_QD1.000000e-01_Width4.200000e-07_Count3' #folder = r'D:\RPM_Rapid\SquarePeriodDouble\PeriodDoublingData_QD1.000000e-01_Width3.800000e-07_Count5' #folder = r'D:\RPM_Rapid\SquarePeriodDouble\PeriodDoublingData_QD8.000002e-02_Width2.600000e-07_Count1' #folder= r'D:\RPM_Rapid\SquarePeriodDouble\PeriodDoublingData_QD6.400004e-02_Width3.400000e-07_Count3' #The folder with all the data in it #folder = r'D:\RPM_Rapid\SquarePeriodDouble' #folder = r'D:\RPM_Rapid\SquarePeriodDouble' folder = r'D:\RPM_Rapid\SizeDependence' #folder = r'D:\RPM_Rapid\SquarePeriodDouble\PeriodDoublingData_QD1.000000e-01_Width4.200000e-07_Count3' #period 2 #folder = r'D:\RPM_Rapid\SquarePeriodDouble\PeriodDoublingData_QD1.000000e-01_Width2.600000e-07_Count2' #period 4 #folder = r'D:\RPM_Rapid\SquarePeriodDouble\PeriodDoublingData_QD1.200009e-02_Width6.000000e-08_Count2' #period 3
''' #Material Parameters Hc = 0.062 #Coercive Field (T) Hc_std = [0, 1, 2, 3, 4, 5] #Stanard deviation in the coercive field (as a percentage) bar_length = 400e-9 #Bar length in m vertex_gap = 100e-9 #Vertex gap in m bar_thickness = 14e-9 #Bar thickness in m bar_width = 120e-9 #Bar width in m magnetisation = 800e3 #Saturation magnetisation of material in A/m (permalloy is 80e3) size = 6 lattice = rpm.ASI_RPM(size,size,bar_length = bar_length, \ vertex_gap = vertex_gap, bar_thickness = bar_thickness, \ bar_width = bar_width, magnetisation = magnetisation) lattice.square(Hc, Hc / 100) #Specify whether it is a square or kagome lattice #lattice.mfmLoad(Mx,My) #lattice.graphCharge() #plt.show() #loops through folders from a defect loop and creates a video with microstate animation. (Need to add lattice counter onto the video) r = [] def animation(folder): for defect in os.listdir(folder): if defect.endswith("Store"): r = 2
from functools import reduce import time reload(rpm) #make sure that the class is updated with any changes #parameters Hc = 0.062 Hc_std = 0.05 bar_length = 400e-9 vertex_gap = 100e-9 bar_thickness = 15e-9 bar_width = 80e-9 magnetisation = 800e3 #Graphing and save/load test kagomeLattice1 = rpm.ASI_RPM(25,25,bar_length = bar_length, vertex_gap = vertex_gap, bar_thickness = bar_thickness, \ bar_width = bar_width, magnetisation = magnetisation) #kagomeLattice1.tiltedSquare(45) #kagomeLattice1.graph() #kagomeLattice1.randomMag() print('test') folder = r'C:\Users\av2813\Box\GitHub\RPM\RPM_Data\KagomeHysteresis2' kagomeLattice1.kagome(Hc, Hc_std) kagomeLattice1.randomMag() kagomeLattice1.fieldSweep(2. * Hc, 20, 0, n=5, loops=2, folder=folder, q1=False) kagomeLattice1.fieldSweepAnalysis(folder)