iFluidCore
This class implements the general TBA equations. Following the hydrodynamical principle, the system is always in a quasi-stationary state, whereby all the methods of the class can be applied at any time for any given filling function.
Note, the iFluidCore
class is abstract and must be extended by classes encoding an actual integrable model. Click here to see how to implement your own model.
Constructor
obj = iFluidCore(x_grid, rapid_grid, rapid_w, couplings, Ntypes, Options)
Construct an iFluidCore object containing all the information and methods of a TBA of a given model.
Inputs:
x_grid
: Vector ofM
gridpoints in position space.rapid_grid
: Vector ofN
gridpoints in rapidity space.rapid_w
: Vector ofN
rapidity quadrature weights.couplings
: Cell array of couplings and their time and space derivatives.Ntypes
: Number of quasiparticle types in the TBA of the model.Options
: Struct of settings.
Returns:
obj
:iFluidCore
object.
Abstract (model specific) methods
ebare = getBareEnergy(obj, t, x, rapid, type)
Calculate the one-particle energy.
Inputs:
t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid
: Scalar or vector indicating the rapidity.type
: Scalar or vector indicating the type index of the quasiparticles.
Returns:
ebare
: One-particle energy.
pbare = getBareMomentum(obj, t, x, rapid, type)
Calculate the one-particle momentum.
Inputs:
t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid
: Scalar or vector indicating the rapidity.type
: Scalar or vector indicating the type index of the quasiparticles.
Returns:
pbare
: One-particle momentum.
de = getEnergyRapidDeriv(obj, t, x, rapid, type)
Calculate the derivative of the one-particle energy w.r.t. the rapidity.
Inputs:
t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid
: Scalar or vector indicating the rapidity.type
: Scalar or vector indicating the type index of the quasiparticles.
Returns:
de
: Derivative of one-particle energy.
dp = getMomentumRapidDeriv(obj, t, x, rapid, type)
Calculate the derivative of the one-particle momentum w.r.t. the rapidity.
Inputs:
t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid
: Scalar or vector indicating the rapidity.type
: Scalar or vector indicating the type index of the quasiparticles.
Returns:
dp
: Derivative of one-particle momentum.
dT = getScatteringRapidDeriv(obj, t, x, rapid1, rapid2, type1, type2)
Calculate the derivative of the two-body scattering phase w.r.t. the rapidity.
Inputs:
t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid1
: Scalar or vector indicating the (main) rapidity.rapid2
: Scalar or vector indicating the (convilution) rapidity.type1
: Scalar or vector indicating the (main) type index of the quasiparticles.type2
: Scalar or vector indicating the (convolution) type index of the quasiparticles.
Returns:
dT
: Derivative of the two-body scattering phase. Must be anfluidcell
.
de = getEnergyCouplingDeriv(obj, coupIdx, t, x, rapid, type)
Calculate the derivative of the one-particle energy w.r.t. the couplings.
Inputs:
coupIdx
: Index indicating the coupling in question.t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid
: Scalar or vector indicating the rapidity.type
: Scalar or vector indicating the type index of the quasiparticles.
Returns:
de
: Derivative of one-particle energy.
dp = getMomentumCouplingDeriv(obj, coupIdx, t, x, rapid, type)
Calculate the derivative of the one-particle momentum w.r.t. the couplings.
Inputs:
coupIdx
: Index indicating the coupling in question.t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid
: Scalar or vector indicating the rapidity.type
: Scalar or vector indicating the type index of the quasiparticles.
Returns:
dp
: Derivative of one-particle momentum.
dT = getScatteringCouplingDeriv(obj, coupIdx, t, x, rapid1, rapid2, type1, type2)
Calculate the derivative of the two-body scattering phase w.r.t. the couplings.
Inputs:
coupIdx
: Index indicating the coupling in question.t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid1
: Scalar or vector indicating the (main) rapidity.rapid2
: Scalar or vector indicating the (convilution) rapidity.type1
: Scalar or vector indicating the (main) type index of the quasiparticles.type2
: Scalar or vector indicating the (convolution) type index of the quasiparticles.
Returns:
dT
: Derivative of the two-body scattering phase. Must be anfluidcell
.
Accessor methods
setCouplings(obj, couplings)
Set the couplings of the model.
Inputs:
couplings
: Cell array of couplings and their time and space derivatives.
couplings = getCouplings(obj)
Get the couplings of the model.
Returns:
couplings
: Cell array of couplings and their time and space derivatives.
[x_grid, rapid_grid, type_grid, rapid_w] = getGrids(obj)
Get all grids of the system.
Returns:
x_grid
: Vector ofM
gridpoints in position space.rapid_grid
: Vector ofN
gridpoints in rapidity space.rapid_w
: Vector ofN
rapidity quadrature weights.type_grid
: Vector from 1 toNtypes
.
TBA methods
Q_dr = applyDressing(obj, Q, theta, t)
Dress the quantity Q
, threby taking into account the collective iteractions of the quasiparticles.
Inputs:
Q
: Quantity to be dressed. Must be anfluidcell
.theta
: Filling function at timet
. Must be anfluidcell
.t
: Scalar indicating the time, corresponding totheta
.
Returns:
Q_dr
: Dressed quantity asfluidcell
.
h_i = getOneParticleEV(obj, charIdx, t, x, rapid)
Returns the one-particle eigenvalue of the i'th conserved charge. By default the 0th charge is the number operator, the 1st charge is the momentum, and the 2nd charge is the Hamiltonian.
Inputs:
charIdx
: Scalar indicating which charge is considered.t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid
: Scalar or vector indicating the rapidity.
Returns:
h_i
: Matrix containing the eigenvalues.
[rho_t, rhoS_t] = transform2rho(obj, theta_t, t_array)
Constructs the root density and the density of states from the filling function.
Inputs:
theta_t
: Cell array of (or single) filling functions asfluidcell
.t_array
: Vector of times corresponding to the fillings intheta_t
.
Returns:
rho_t
: Cell array of (or single) root densities asfluidcell
.rhoS_t
: Cell array of (or single) density of states asfluidcell
.
[theta_t, rhoS_t] = transform2theta(obj, rho_t, t_array)
Constructs the filling function and the density of states from the root density.
Inputs:
rho_t
: Cell array of (or single) root densities asfluidcell
.t_array
: Vector of times corresponding to the root densities inrho_t
.
Returns:
theta_t
: Cell array of (or single) filling functions asfluidcell
.rhoS_t
: Cell array of (or single) density of states asfluidcell
.
[q, j, Vq, Vj] = calcCharges(obj, c_idx, theta_t, t_array, varargin)
Calculate the expectation values of the i'th charge densities and associated currents.
Inputs:
c_idx
: Scalar or vector of indices indicating which charges to consider.theta_t
: Cell array of (or single) filling functions asfluidcell
.t_array
: Vector of times corresponding to the fillings intheta_t
.varargin
: Optional arguments, passed ascalcCharges(..., 'argument_name', value)
calc_formfactors
: (default=false) if true, calculateVq
andVj
.sum_types
: (default=true) if true, sum the contributions of the individual quasi-particle types when computing the charges.
Returns:
q
: Matrix of charge density expectation values for times int_array
.j
: Matrix of charge current expectation values for times int_array
.Vq
: Cell array of one-particle density form factors for times int_array
.Vj
: Cell array of one-particle current form factors for times int_array
.
[theta, e_eff] = calcThermalState(obj, T, TBA_couplings)
Calculates a thermal state of the model specified by the couplings and temperature.
Inputs:
T
: Temperature. Can be either a scalar (homogeneous) or an anonymous function ofx
(inhomogeneous).TBA_couplings
: (Optional) Cell array of couplings. If none specified, the couplings of theiFluidCore
object are used instead.
Returns:
theta
: Filling function of thermal state asfluidcell
.e_eff
: Pseudo-energy of thermal state asfluidcell
.
[v_eff, a_eff] = calcEffectiveVelocities(obj, theta, t, x, rapid, type)
Calculate the effective velocity and acceleration of the quasiparticles given the current state of the system.
Inputs:
theta
: Filling function at timet
.t
: Scalar indicating the time.x
: Scalar or vector indicating the position.rapid
: Scalar or vector indicating the rapidity.type
: Scalar or vector indicating the type index of the quasiparticles.
Returns:
v_eff
: Effective velocity asfluidcell
.a_eff
: Effective acceleration asfluidcell
.
e_eff = calcEffectiveEnergy(obj, w, t, x)
Calculate the pseudo-energy of the system.
Inputs:
w
: Source term. .t
: Scalar indicating the time.x
: Scalar or vector indicating the position.
Returns:
e_eff
: Peuso-energy asfluidcell
.
Methods dependent on quasiparticle statisitcs
f = getStatFactor(obj, theta)
Returns the statistical factor based the statistics followed by the quasiparticles of the model.
Inputs:
theta
: Filling function asfluidcell
.
Returns:
f
: Statistical factor asfluidcell
.
F = getFreeEnergy(obj, e_eff)
Returns the free energy function of the model based on the quasiparticle statistics.
Inputs:
e_eff
: Pseudo-energy of the state asfluidcell
.
Returns:
F
: Free energy function asfluidcell
.
theta = calcFillingFraction(obj, e_eff)
Calculates the filling function of a thermal state based on the quasiparticle statistics.
Inputs:
e_eff
: Pseudo-energy of the state asfluidcell
.
Returns:
theta
: Filling function asfluidcell
.
Options
The iFluidCore
class takes an Options
struct as argument in its constructor. The Options
struct can hold the following (case sensitive!) parameters, which are transferred to the iFluidCore
object upon construction.
The possible options are:
homoEvol
(defaultfalse
): Indicates if all couplings are homogeneous. If true,a_eff
will not be calculated.tolerance
(default1e-6
): Tolerance for iterative solution for pseudo-energy.maxcount
(default100
): Max nnumber of iterations for finding pseudo-energy.