Skip to content
Snippets Groups Projects
Commit 7d8cd260 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

Microwave oven example.

parent f20b96d5
No related branches found
No related tags found
No related merge requests found
SetFactory("OpenCASCADE");
width = 0.30;
height = 0.20;
depth = 0.28;
wg_width = 0.10;
wg_height = 0.05;
Box(1) = {0.0, 0.0, 0.0, width, height, depth};
Rectangle(100) = { width/2 - wg_width/2, height/2 - wg_height/2, 0 , wg_width, wg_height, 0 };
BooleanFragments{ Volume{1}; Delete; }{ Surface{100}; Delete; }
MeshSize{:} = 0.02;
sim.name = "oven" -- simulation name
sim.dt = 1e-13 -- timestep size
sim.timesteps = 100000 -- num of iterations
sim.gmsh_model = "oven.geo" -- gmsh model filename
sim.use_gpu = 0 -- 0: cpu, 1: gpu
sim.approx_order = 1 -- approximation order
sim.time_integrator = "leapfrog"
postpro.silo_output_rate = 100 -- rate at which to write silo files
postpro.cycle_print_rate = 100 -- console print rate
postpro["H"].silo_mode = "none"
postpro["J"].silo_mode = "none"
debug = {}
debug.dump_cell_ranks = true
materials[1] = {}
materials[1].epsilon = 1
materials[1].mu = 1
materials[1].sigma = 0
-- ** Boundary conditions **
local freq = 2.45e9
function source(tag, x, y, z, t)
local Ex = 0
local Ey = math.sin((x-0.1)*math.pi/0.1)*math.sin(2*math.pi*t*freq)
local Ez = 0
return Ex, Ey, Ez
end
bndconds[100] = {}
bndconds[100].kind = "plane_wave_E"
bndconds[100].source = source
......@@ -4,14 +4,15 @@
--[[ Problem setup ]]--
sim.name = "test_maxwell_resonator" -- simulation name
sim.dt = 1e-12 -- timestep size
sim.timesteps = 10001 -- num of iterations
sim.timesteps = 8001 -- num of iterations
sim.gmsh_model = "resonator.geo" -- gmsh model filename
sim.use_gpu = 1 -- 0: cpu, 1: gpu
sim.approx_order = 1 -- approximation order
sim.use_gpu = 0 -- 0: cpu, 1: gpu
sim.approx_order = 2 -- approximation order
sim.time_integrator = "leapfrog"
postpro.silo_output_rate = 100
postpro.cycle_print_rate = 100 -- console print rate
postpro["E"].silo_mode = "zonal"
postpro["J"].silo_mode = "none"
local epsr = 1
......@@ -65,6 +66,6 @@ function ansol(tag, x, y, z, t)
end
--debug.analytical_solution = ansol
debug.dump_cell_ranks = true
SetFactory("OpenCASCADE");
Box(1) = {0, 0, 0, 1, 0.1, 1};
MeshSize{:} = 0.05;
MeshSize{:} = 0.04;
......@@ -383,7 +383,10 @@ void solver_mainloop(const model& mod, State& state, maxwell::parameter_loader&
tc.tic();
}
}
std::cout << showcursor << std::endl;
#ifdef USE_MPI
if (proc_rank == 0)
#endif /* USE_MPI */
std::cout << showcursor << std::endl;
}
static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment