Warwick-Plasma/epoch

Linear density Ramp

amarsarari opened this issue · 1 comments

Dear Sir

How we can build linear density ramp for any species. For refer
1
ence i m attaching a pic.

Hey @amarsarari,

This can be done by modifying the basic target input deck. An example implementation has been included at the end of this message.

Here I have added the line: density = if (x gt 10.0e-6, 1.0e24 * (x - 10.0e-6) / 5.0e-6, 0) to the species block. This should set the density to linearly rise from 0 to $10^{24} m^{-3}$ between $x=10\mu m$ and $x=15\mu m$, using EPOCH maths parser syntax. Note that this line actually makes the density rise linearly up to the $x_{max}$ boundary, but we override the behaviour after $x=15\mu m$ in the following lines.

begin:control
    nx = 500
    ny = 500
    t_end = 1.0e-15
    x_min = 0
    x_max = 25e-6
    y_min = 0
    y_max = 25e-6
    stdout_frequency = 100
    npart = 50 * (5.0e-6/(x_max-x_min)) * nx * ny
end:control

begin:boundaries
    bc_x_min = open
    bc_x_max = open
    bc_y_min = open
    bc_y_max = open
end:boundaries

begin:species
    name = Electron
    mass = 1.0
    charge = -1.0
    frac = 0.8
    density = if (x gt 10.0e-6, 1.0e24 * (x - 10.0e-6) / 5.0e-6, 0)
    density = if (x gt 15.0e-6, 1.0e24, density(Electron))
    density = if (x gt 20.0e-6, 0, density(Electron))
    temp_ev = 1000
end:species

begin:species
    name = Carbon
    mass = 22033.0
    charge = 6.0
    frac = 0.2
    density = density(Electron) / 6
    temp_ev = 1000
end:species

begin:output
    dt_snapshot = t_end
    number_density = always
end:output

ramp