Fix COMSOL ferromagnet model, and make a new example for it

I'm a little skeptical of it as a model, though.
This commit is contained in:
2020-08-22 22:35:45 -07:00
parent f4d8ffdf34
commit c68964403d
4 changed files with 50 additions and 4 deletions

View File

@@ -51,13 +51,14 @@ impl ColorTermRenderer {
let cell = state.get(x, y);
//let r = norm_color(cell.bz() * consts::C);
//let r = 0;
let r = norm_color(cell.mat.mz*50.0);
let r = norm_color(cell.mat.mz);
let b = (55.0*cell.mat().conductivity).min(255.0) as u8;
//let b = 0;
//let g = norm_color(cell.ex());
//let b = norm_color(cell.ey());
//let g = norm_color(curl(cell.ex(), cell.ey()));
let g = norm_color((cell.bz() * 3.0e8).into());
//let g = norm_color((cell.bz() * 3.0e8).into());
let g = norm_color(cell.ey().into());
write!(&mut buf, "{}", RGB(r, g, b).paint(square));
}
write!(&mut buf, "\n");