Open mimboch opened 1 week ago
Hey @mimboch,
I've adapted the basic target demo using expressions from the maths parser to obtain the following target:
which was created with this input deck:
begin:control
nx = 800
ny = 120
t_end = 1.0e-15
x_min = -20e-6
x_max = 20e-6
y_min = -3.0e-6
y_max = 3.0e-6
stdout_frequency = 100
npart = 10 * 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:constant
targ_length = 25e-6
targ_rod_thickness = 600e-9
targ_ball_radius = 2e-6
targ_dens = 1.0e24
end:constant
begin:species
name = Electron
mass = 1.0
charge = -1.0
frac = 0.8
temp_ev = 1000
# Rod part
density = if (abs(y) lt 0.5*targ_rod_thickness \
and abs(x) lt (targ_length/2 - targ_ball_radius), \
targ_dens, 0)
# Balls
density = if ((abs(x)-targ_length/2 + targ_ball_radius)^2 + \
y^2 lt targ_ball_radius^2, targ_dens, density(Electron))
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
Hope this helps, Stuart
Thank you so much for your assistance .
Hello, I should have a smooth transition between the circles and the flat section, as shown in the attached picture. I am trying to achieve this with Expo functions, but it didn’t work. Could you please help me again? Thank you in advance.
Can you be more specific about the curve-shape? For an exponential, I would need to know where you want it to start from, which point on the circle you want it to end, and the exponential scale-length $k$, for a functional form $\exp(x/k)$.
If the older ball-rod target above doesn't work for you, then your results must be sensitive to the nature of this curve. If I just give you a random curve, it will probably have the same problem as the simple ball-rod.
Hello, Thank you for your reply; I really appreciate it. Yes, you are absolutely right, but it is not necessarily the goal is to have these curves. For example, I could use a decreasing exponential function from 2 (center of the circle) to 5 µm on the left side and an increasing exponential function from 19 to 23 µm on the right side, with an exponential scale length k=2μm.
Hello, I'm trying to simulate the following shape of the jet gas target, with circular ends and a flat section in the middle . I would be very grateful if anyone could give me a hand. Thank you in advance.