vinamax

package module
v0.0.0-...-ba0cb32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: GPL-3.0 Imports: 7 Imported by: 11

README

vinamax

Vinamax is a macrospin simulation tool for nanoparticles.

Documentation

Overview

Contains function to control the output of the program

Index

Constants

This section is empty.

Variables

View Source
var (
	//These variables can be set in the input files
	B_ext       func(t float64) (float64, float64, float64)                  // External applied field in T
	B_ext_space func(t, x, y, z float64) (float64, float64, float64)         // External applied field in T
	Dt          float64                                              = -1    // Timestep in s
	Mindt       float64                                              = 1e-20 //smallest allowed timestep
	Maxdt       float64                                              = 1     //largest allowed timestep
	T           float64                                                      // Time in s
	Alpha       float64                                              = -1    // Gilbert damping constant

	Temp float64 = -1 // Temperature in K
	Ku1  float64 = 0  // Uniaxial anisotropy constant in J/m**3
	Ku2  float64 = 0  // Uniaxial anisotropy constant in J/m**3

	Kc1            float64 = 0 // Cubic anisotropy constant in J/m**3
	Errortolerance float64 = 1e-5
	Thresholdbeta  float64 = 0.3 // The threshold value for the FMM

	Universe node         // The entire Universe of the simulation
	FMM      bool = false // Calculate demag with FMM method
	Demag    bool = true  // Calculate demag

	Adaptivestep bool = false

	Tau0 float64 = 1e-8

	Jumpnoise        bool = false
	Brown            bool = false
	BrownianRotation bool = false

	//noMagDyn	    bool = false //set this to true to skip calculations of magnetisation dynamics
	Condition_1 bool = false
	Condition_2 bool = false

	Test           bool    = false
	Counter        int     = 0
	Max_u_anis_x   float64 = 0.
	Max_u_anis_z   float64 = 0.
	Min_u_anis_x   float64 = 1.
	Min_u_anis_z   float64 = 1.
	Max_u_anis_x_2 float64 = 0.
	Max_u_anis_z_2 float64 = 0.
	Min_u_anis_x_2 float64 = 1.
	Min_u_anis_z_2 float64 = 1.
	Trigger        bool    = false
	Freq           float64 = 0.0
	Print1         bool    = false
	Print0         bool    = false
	Nsteps         int     = 0
)

Functions

func AddAnisotropicParticle

func AddAnisotropicParticle(x, y, z, ux, uy, uz float64)

func Addfixedparticle

func Addfixedparticle(x, y, z, mx, my, mz float64)

func Addsingleparticle

func Addsingleparticle(x, y, z float64)

func Anisotropy_axis

func Anisotropy_axis(x, y, z float64)

Gives all particles the same specified uniaxialanisotropy-axis

func Anisotropy_random

func Anisotropy_random()

Gives all particles a random anisotropy-axis

func Anisotropy_random_xy

func Anisotropy_random_xy()

Gives all particles a random anisotropy-axis in the xy plane

func C1anisotropy_axis

func C1anisotropy_axis(x, y, z float64)

Gives all particles the same specified cubic1anisotropy-axis

func C2anisotropy_axis

func C2anisotropy_axis(x, y, z float64)

Gives all particles the same specified cubic2anisotropy-axis, must be orthogonal to c1

func Demagevery

func Demagevery(t float64)

demag every interval

func E_anis

func E_anis() float64

returns total anisotropy energy

func E_demag

func E_demag() float64

returns total demag energy

func E_therm

func E_therm() float64

returns total thermal energy

func E_total

func E_total() float64

returns total energy in the simulation

func E_zeeman

func E_zeeman() float64

returns total zeeman energy

func Give_mz

func Give_mz() float64

func Lognormal_diameter

func Lognormal_diameter(mean, stdev float64)

set the radius of all entries in radii to a diameter taken from a lognormal distribution with specified mean and stdev

func M_MSM

func M_MSM(tmag, field float64)

Gives all particles magnetisation specified by the moment superposition model

func M_random

func M_random()

Gives all particles with random magnetisation orientation

func M_random_xy

func M_random_xy()

Gives all particles with random magnetisation orientation in the xy plane

func M_uniform

func M_uniform(x, y, z float64)

Gives all particles a specified magnetisation direction

func Maketree

func Maketree()

Build the tree needed for the FMM method, descends in the "Universe" node

func Msat

func Msat(x float64)

Sets the saturation magnetisation of all particles in A/m

func Output

func Output(interval float64)

Sets the interval at which times the output table has to be written

func Particle_radius

func Particle_radius(x float64)

Sets the radius of all entries in radii to a constant value

func Particle_radius_h

func Particle_radius_h(x float64)

Sets the hydrodynamic radius of all entries in radii to a constant value or constant coating in case core distribution

func Relax

func Relax()

func ReturnParticle

func ReturnParticle(num int) *particle

func Run

func Run(time float64)

func Save

func Save(a string)

Saves different quantities. At the moment only "geometry" and "m" are possible

func Setgeorandomseed

func Setgeorandomseed(a int64)

Set the randomseed for the geometry

func Setrandomseed

func Setrandomseed(a int64)

Set the randomseed for the temperature

func Setrandomseed_anis

func Setrandomseed_anis(a int64)

Set the randomseed for the anisotropy dynamics

func Setsolver

func Setsolver(a string)

Set the solver to use, "euler" or "heun"

func Setviscosity

func Setviscosity(visc float64)

Sets viscosity of particles to be added directly to the Universe

func Tableadd

func Tableadd(a string)

adds a quantity to the output table, at the moment only "B_ext" is possible

func Tableadd_b_at_location

func Tableadd_b_at_location(x, y, z float64)

Adds the field at a specific location to the output table

func Tablesave

func Tablesave()

func U2anisotropy_axis

func U2anisotropy_axis(x, y, z float64)

Gives all particles the same specified second uniaxial anisotropy-axis

func World

func World(x, y, z, r float64)

Defines the Universe, its center and its diameter

func Writeintable

func Writeintable(a string)

Types

type Cube

type Cube struct {
	S float64 //side
	// contains filtered or unexported fields
}

func (Cube) Addparticles

func (c Cube) Addparticles(n int)

Adds a number of particles at random locations in a cubic region

func (Cube) Setorigin

func (c Cube) Setorigin(x1, y1, z1 float64)

Sets origin of the cube

func (Cube) Setviscosity

func (c Cube) Setviscosity(visc float64)

Sets viscosity of particles in the cube (e.g. different viscosity regions possible)

type Cuboid

type Cuboid struct {
	Sidex, Sidey, Sidez float64 //side
	// contains filtered or unexported fields
}

func (Cuboid) Addparticles

func (c Cuboid) Addparticles(n int)

Adds a number of particles at random locations in a cubic region

func (Cuboid) Setorigin

func (c Cuboid) Setorigin(x1, y1, z1 float64)

Sets origin of the cuboid

func (Cuboid) Setviscosity

func (c Cuboid) Setviscosity(visc float64)

Sets viscosity of particles in the cuboid (e.g. different viscosity regions possible)

Directories

Path Synopsis
examples
example3
This example shows the agreement between the Dipole approximation Method implementation and the brute force implementation of the magnetostatic interaction.
This example shows the agreement between the Dipole approximation Method implementation and the brute force implementation of the magnetostatic interaction.
tester/ACS_Brownian_particles
This examples checks if 250 particles with only Brownian relaxation behaves according to the LRT model for ACS This examples checks if 250 particles with only Brownian relaxation behaves according to the LRT model for ACS This examples checks if 250 particles with only Brownian relaxation behaves according to the LRT model for ACS
This examples checks if 250 particles with only Brownian relaxation behaves according to the LRT model for ACS This examples checks if 250 particles with only Brownian relaxation behaves according to the LRT model for ACS This examples checks if 250 particles with only Brownian relaxation behaves according to the LRT model for ACS
tester/field_relaxation
This examples checks if 1000 particles relax to a perpendicular field according to reeves and weaver 2015 This examples checks if 1000 particles relax to a perpendicular field according to reeves and weaver 2015 This examples checks if 1000 particles relax to a perpendicular field according to reeves and weaver 2015 This examples checks if 1000 particles relax to a perpendicular field according to reeves and weaver 2015 This example shows the agreement between the Dipole approximation Method implementation and the brute force implementation of the magnetostatic interaction.
This examples checks if 1000 particles relax to a perpendicular field according to reeves and weaver 2015 This examples checks if 1000 particles relax to a perpendicular field according to reeves and weaver 2015 This examples checks if 1000 particles relax to a perpendicular field according to reeves and weaver 2015 This examples checks if 1000 particles relax to a perpendicular field according to reeves and weaver 2015 This example shows the agreement between the Dipole approximation Method implementation and the brute force implementation of the magnetostatic interaction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL