Open spaceZt3 opened 1 year ago
I figured out this problem. Ref: https://amrex-codes.github.io/amrex/docs_html/BuildingAMReX.html
I try the example "FerroX/Exec/Examples/inputs_mfim_Noeb_TimeDependent". It can't finish the calculation, it stops at time step 152. Can you verify the input file?
Hi @spaceZt3, Thanks for your interest in using FerroX! I am glad that you figured out the way to build the code.
Thanks for testing the example input script. You are right, the simulation indeed stops at time step 152. We made some changes in the code recently, but did not update all the input files accordingly.
You can add the following lines to FerroX/Exec/Examples/inputs_mfim_Noeb_TimeDependent
after line number 58:
voltage_sweep = 1
Phi_Bc_lo = 0.0
Phi_Bc_hi = -5.0
Phi_Bc_inc = 1.0
Phi_Bc_hi_max = 5.0
This will simulate the MFIM stack with an applied voltage (V_app) sweep beginning at V_app = -5.0 V
and will stop at V_app = 5.0 V
with an increment of 1.0 V
. You can, of course, change these numbers according to your need.
Please let me know if this resolves your problem or if you encounter any other issues. We will be happy to discuss your specific simulation needs as well.
Cheers!
Thanks @prkkumar ! I have a question about the # ELECTRICAL BOUNDARY CONDITIONS # definition in input file. What's the difference between:
boundary.hi = per per dir(Zmax) boundary.lo = per per dir(Zmin) boundary.Zmax_function = "(t <= t_Vmax) (Vmin + (Vmax - Vmin)(t/t_Vmax)) + (t > t_Vmax)(Vmax - (Vmax - Vmin)(t-t_Vmax)/(t_final - t_Vmax))"
voltage_sweep = 1 Phi_Bc_lo = 0.0 Phi_Bc_hi = -5.0 Phi_Bc_inc = 1.0 Phi_Bc_hi_max = 5.0
The applied voltage (V_app) sweep beginning at V_app = -5.0 V and will stop at V_app = 5.0 V with an increment of 1.0 V. But it doesn't turn back (from 5V to -5V)?
Hello, I am trying to run FerroX and thanks to this discussion managed to build and install AMReX, however, when I try to build FerroX using Cmake I get the following error:
CMake Error at CMakeLists.txt:14 (setup_tutorial): Unknown CMake command "setup_tutorial".
I am unsure of how to solve this, commenting setup_tutorial seems to be the wrong step since I do not see an executable so I assume setup_tutorial is a macro which adds an executable ? Furthermore, I am not entirely sure why set(_sources main.cpp myfunc.H) has myfunc.H which does not seem to be in the directory?
These are the full list of commands I ran:
INSTALL AMREX (inside FerroX folder): mkdir build cd build cmake -DAMReX_OMP=YES -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=../ ../../amrex make install make test_install #PASSES CORRECT INSTALLATION rm -rf build
BUILD FERROX (inside FerroX folder): mkdir build cd build cmake .. cmake --build . -j2 #FAILS AT SETUP_TUTORIAL COMMAND
I understand this may be a trivial problem, but I would really appreciate some help! Thank you
Go to the Exec folder under FerroX. Edit the GNUmakefile. And then "make" to compile.
Correct - cmake does not presently work, just use "make" - let me know if you have any problems.
Hello, Thank you that worked! I am trying to recreate the plots from the FerroX paper, specifically Fig 3(a). I believe that its the visualization of inputs_mfis_eb however, upon running the following code I see that my axes are off by a factor of 10000. I have USE_CUDA as False in the GNUmakefile, but I am not sure if that would be responsible? I would really appreciate some help on this thank you! import yt ds = yt.load("./inputs_mfis_eb/plt00000220/") cnt = [-1.0e-08, 0 , 1.0e-08] p = yt.SlicePlot(ds, "y", "Pz", center = cnt) p.set_cmap("Pz", "jet") p.set_axes_unit("nm") p My figure:
When plotting the generated datasets available on zenodo, I notice the properties are different from those in inputs_mfis_eb so I am not really sure how to recreate the figures.
Thank you!
To run inputs_mfis_eb
, you will need to compile with USE_EB=TRUE. The setup is almost identical to Fig 3a, except that it uses an embedded boundary object to represent the metal electrode at the top of the ferroelectric layer.
You should get a pretty similar result as Fig 3a, with inputs_mfis_eb
when you run the code compiled with USE_EB=TRUE.
Alternatively, you can try modifying inputs_mfis_eb
to work without EB. You can try the following:
#################################
###### PROBLEM DOMAIN ######
#################################
domain.prob_lo = -16.e-9 -16.e-9 0.e-9
domain.prob_hi = 16.e-9 16.e-9 16.e-9
domain.n_cell = 64 64 32
domain.max_grid_size = 64 64 32
#domain.blocking_factor = 16 16 16
domain.coord_sys = cartesian
prob_type = 1
TimeIntegratorOrder = 1
nsteps = 1000
plot_int = 100
dt = 2.0e-13
############################################
###### POLARIZATION BOUNDARY CONDITIONS ####
############################################
P_BC_flag_lo = 3 3 0
P_BC_flag_hi = 3 3 1
lambda = 3.0e-9
############################################
###### ELECTRICAL BOUNDARY CONDITIONS ######
############################################
domain.is_periodic = 1 1 0
boundary.hi = per per dir(0.0)
boundary.lo = per per dir(0.0)
Phi_Bc_lo = 0.0
Phi_Bc_hi = 0.0
inc_step = 5000
Phi_Bc_inc = 0.0
#################################
###### STACK GEOMETRY ###########
#################################
SC_lo = -16.e-9 -16.e-9 0.e-9
SC_hi = 16.e-9 16.e-9 10.e-9
#SC_lo = -1. -1. -1.
#SC_hi = -1. -1. -1.
DE_lo = -16.e-9 -16.e-9 10.0e-9
DE_hi = 16.e-9 16.e-9 11.0e-9
FE_lo = -16.e-9 -16.e-9 11.0e-9
FE_hi = 16.e-9 16.e-9 16.e-9
#################################
###### MATERIAL PROPERTIES ######
#################################
epsilon_0 = 8.85e-12
epsilonX_fe = 24.0
epsilonZ_fe = 24.0
epsilon_de = 3.9
epsilon_si = 11.7
alpha = -2.5e9
beta = 6.0e10
gamma = 1.5e11
BigGamma = 100
g11 = 1.0e-9
g44 = 1.0e-9
g44_p = 0.0
g12 = 0.0
alpha_12 = 0.0
alpha_112 = 0.0
alpha_123 = 0.0
Thank you so much it worked!
Recently, I came across this interesting aper https://arxiv.org/abs/2402.05331. I have a few technical questions.
Thanks for your time!
Thanks for checking out the paper!
I tried to compile the nodal_Poisson branch of FerroX with GPU enabled. But I got some AMReX-related error messages. The development branch of https://github.com/AMReX-Codes/amrex.git was used. Is it the correct repo/branch?
See here for the full output. And here is one of the error messages.
../Source/Solver/ElectrostaticSolver.cpp(75): error: calling a host function("amrx::Print& amrex::Print::operator <<<char [2]> (const T1 &)") from a device function("ComputePoissonRHS( ::amrex::MultiFab &, ::std::array< ::amrex::MultiFab, (unsigned long)3ul> &, ::amrex::MultiFab &, ::amrex::MultiFab &, ::amrex::MultiFab &, ::amrex::MultiFab &, ::amrex::MultiFab &, const ::amrex::Geometry &)::[lambda(int, int, int) (instance 1)]::operator () const") is not allowed
Hello,
I am facing an issue while trying to recreate Fig 2 of the FerroX paper and was wondering if there is a problem in my domain setup for an MFM stack. What I have currently converges fully at step 61 producing bands of polarization instead of a more continuous distribution of values which I believe is due to the voltage sweep not working correctly. I have tried to implement the voltage sweep according to an earlier post in this thread but am still facing issues.
This is my input file:
#################################
#################################
domain.prob_lo = -16.0e-9 -16.0e-9 0.0e-9 domain.prob_hi = 16.0e-9 16.0e-9 10.0e-9
domain.n_cell = 64 64 20
domain.max_grid_size = 64 64 20
domain.coord_sys = cartesian
prob_type = 2
TimeIntegratorOrder = 1
nsteps = 10000 plot_int = 500
dt = 2.0e-13
############################################
############################################
P_BC_flag_lo = 3 3 0 P_BC_flag_hi = 3 3 1 lambda = 3.0e-9
############################################
############################################
domain.is_periodic = 1 1 0
boundary.hi = per per dir(0) boundary.lo = per per dir(0)
voltage_sweep = 1 Phi_Bc_lo = 0.0 Phi_Bc_hi = -5.0 Phi_Bc_inc = 1.0 Phi_Bc_hi_max = 5.0 inc_step = 500
#################################
#################################
FE_lo = -16.0e-9 -16.0e-9 0.0e-9 FE_hi = 16.0e-9 16.0e-9 10.0e-9
#################################
#################################
epsilon_0 = 8.85e-12 epsilonX_fe = 24.0 epsilonZ_fe = 24.0 epsilon_de = 3.9 epsilon_si = 11.7 alpha = -2.5e9 beta = 6.0e10 gamma = 1.5e11 BigGamma = 100 g11 = 0.0e-9 g44 = 0.0e-9 g44_p = 0.0e-9 g12 = 1.0e-9 alpha_12 = 0.0 alpha_112 = 0.0 alpha_123 = 0.0
I would love for a review and I appreciate your time! Thank you!
Can you try the following in the ELECTRICAL BOUNDARY CONDITIONS section:
boundary.hi = per per dir(-5.0) boundary.lo = per per dir(0.0)
voltage_sweep = 1 Phi_Bc_lo = 0.0 Phi_Bc_hi = -5.0 Phi_Bc_inc = 1.0 Phi_Bc_hi_max = 5.0 phi_tolerance = 1.e-6 num_Vapp_max = 21
The voltage sweep code was updated recently. It now requires the user to specify the error tolerance to check steady state to increment the applied voltage. Try the above suggestion and if you encounter any issues, feel free to reach out to us.
Hello,
Thank you for your comment. I tried these conditions however I still end up getting a curve with bands of polarization centered at 4 points (fig attached) instead of the hysteresis loop of Fig 2.
I was wondering if there is any fitting involved to create the loop because with 0 BCs I am able to obtain a "S" curve as shown in Saha and Gupta Fig 1(c). I do assume this point is wrong since Fig 2 of FerroX has discrete points that match with experiment.
"S" curve with 0 BCs
Also for reference is the updated input file: #################################
#################################
domain.prob_lo = -16.0e-9 -16.0e-9 0.0e-9 domain.prob_hi = 16.0e-9 16.0e-9 10.0e-9
domain.n_cell = 64 64 20
domain.max_grid_size = 64 64 20
domain.coord_sys = cartesian
prob_type = 2
TimeIntegratorOrder = 1
nsteps = 10000 plot_int = 500
dt = 2.0e-13
############################################
############################################
P_BC_flag_lo = 3 3 0 P_BC_flag_hi = 3 3 1 lambda = 3.0e-9
############################################
############################################
domain.is_periodic = 1 1 0
boundary.hi = per per dir(-5.0) boundary.lo = per per dir(0.0)
voltage_sweep = 1 Phi_Bc_lo = 0.0 Phi_Bc_hi = -5.0 Phi_Bc_inc = 1.0 Phi_Bc_hi_max = 5.0 phi_tolerance = 1.0e-6 num_Vapp_max = 21
#################################
#################################
FE_lo = -16.0e-9 -16.0e-9 0.0e-9 FE_hi = 16.0e-9 16.0e-9 10.0e-9
#################################
#################################
epsilon_0 = 8.85e-12 epsilonX_fe = 24.0 epsilonZ_fe = 24.0 epsilon_de = 3.9 epsilon_si = 11.7 alpha = -2.5e9 beta = 6.0e10 gamma = 1.5e11 BigGamma = 100 g11 = 0.0e-9 g44 = 0.0e-9 g44_p = 0.0e-9 g12 = 1.0e-9 alpha_12 = 0.0 alpha_112 = 0.0 alpha_123 = 0.0
Thank you for your time!
Dear @prkkumar @jackieyao0114 , how to build and run the codes FerroX?