# Reference page for Material

## Contents

- Summary
- harmonic-approximation BH-curve (eq. (47) in Arkkio's thesis)
- Material/this.add_domain(
*arguments*) is a function. - this.clear_copy(
*arguments*) New independent copy of the material. - this.create(
*arguments*) Create material - this.detach(
*arguments*) Clear elements, domains, etc. - this.differential_reluctivity(
*arguments*) Return reluctivity and its derivative. - this.fit_Langevin1(
*arguments*) Process BH data with Langevin approach. - this.from_specs(
*arguments*) Create material from specs. - this.init_for_problem(
*arguments*) Initialize object for problem. - this.initialize_material_data(
*arguments*) Calculate reluctivities etc. - this.iron_loss_density_time_domain_Steinmetz(
*arguments*) Iron loss density from modified Steinmetz - this.plot_BH(
*arguments*) Plot BH curves etc. - Material.this.process_BH(
*arguments*) is a function. - this.raw_reluctivity(
*arguments*) Evaluate (non-differential) reluctivity. - this.save_to_excel(
*arguments*) Save material specs to Excel. - Material/this.shift_elements(
*arguments*) is a function. - Material/this.thermal_conductivity(
*arguments*) is a function.

## Summary

Material Basic isotropic material class.

Materials are normally instantiated with the static methods

`Material.create`

`Material.from_specs`Documentation for Material doc Material

# PROPERTIES

- B - given B-curve

- H - given H-curve

- Material/data is a property.

- domains - list of domains that are made of this material

- elements - indices to finite elements

- material_properties - struct of material properties

- plot_args - plotting instructions for this

- stacking_factors - list of stacking factors per each element

# METHODS

Class methods are listed below. Inherited methods are not included.

## harmonic-approximation BH-curve (eq. (47) in Arkkio's thesis)

## Material/this.add_domain(*arguments*) is a function.

*this* = **add_domain**(*this*, domain)

## this.clear_copy(*arguments*) New independent copy of the material.

## this.create(*arguments*) Create material

mat = Material.*create*(material_object)

Return a clear_copy of material_object.

mat = Material.*create*(matid)

Create a material from library, see get_defaultMaterial

mat = Material.*create*()

Create an empty Material object.

## this.detach(*arguments*) Clear elements, domains, etc.

## this.differential_reluctivity(*arguments*) Return reluctivity and its derivative.

[nu, dnu] = **differential_reluctivity**(*this*. Bvector, true)

Return reluctivity and its derivative w.r.t. `B`^2 computed with the harmonic approximation

[H, dHdB] = **differential_reluctivity**(*this*, Bvector)

Return magnetic field strength vector and the differential reluctivity tensor. Only works in 2D.

## this.fit_Langevin1(*arguments*) Process BH data with Langevin approach.

**fit_Langevin1**(*this*)

Process given BH data (*this*.B, *this*.H). Given data range is used as such. Extrapolation to higher flux densities is performed by fitting the single Langevin function to the data, and using it for extrapolation.

**fit_Langevin1**(*this*, 'monotonicity_factor', c)

Additional improve the reluctivity-monotonicity of the given data with the following approach:

1. Compute nu = H / B

2. Make nu monotonic.

3. Compute H_monotonic = nu * B

4. Replace H := (1-c)*H_original + c*H_monotonic.

5. Proceeed as earlier.

Even a small monotonicity factor can often improve the convergence of nonlinear problems.

NOTE: Original BH data is not modified.

## this.from_specs(*arguments*) Create material from specs.

Call syntax:

mat = Material.*from_specs*('name', name, 'B', B_curve_vector, 'H', H_curve_vector, 'property_name_1', value_1, ...)

## this.init_for_problem(*arguments*) Initialize object for problem.

Normally, *this* method does very little apart from determining the stacking factors. It could be used to initialize hysteresis models or similar in subclasses on Material, though.

## this.initialize_material_data(*arguments*) Calculate reluctivities etc.

Compute reluctivities and extrapolate BH data.

Reluctivity data as a function of B^2 is saved to ` this.data`.

## this.iron_loss_density_time_domain_Steinmetz(*arguments*) Iron loss density from modified Steinmetz

model, in W/kg.

[physt, peddy] = ... **iron_loss_density_time_domain_Steinmetz**(*this*, timestamps, Bx, By)

physt = hysteresis loss density = ch * (`Bx^a * dBx/dt^b` + `By^a * dBy/dt^b`

where a=b=1 by default, if not given in *this*.material_properties.steinmetz_exponents = 1x2 vector

peddy = eddy loss density = ce * ( (dBx/dt)^2 + (dBy/dt)^2 )

## this.plot_BH(*arguments*) Plot BH curves etc.

## Material.this.process_BH(*arguments*) is a function.

[Bnu, Bdnu] = **process_BH**(BH, varargin)

## this.raw_reluctivity(*arguments*) Evaluate (non-differential) reluctivity.

nu = **raw_reluctivity**(*this*, B2)

## this.save_to_excel(*arguments*) Save material specs to Excel.

## Material/this.shift_elements(*arguments*) is a function.

*this* = **shift_elements**(*this*, Ne)

## Material/this.thermal_conductivity(*arguments*) is a function.

l = **thermal_conductivity**(*this*)