Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default value of min_tick_distance in potential calculation #448

Open
fhagemann opened this issue Jan 3, 2025 · 0 comments
Open

Comments

@fhagemann
Copy link
Collaborator

min_tick_distance::NTuple{3, T} = if CS == Cylindrical
if !ismissing(min_tick_distance)
if min_tick_distance isa LengthQuantity
world_r_mid = (sim.world.intervals[1].right + sim.world.intervals[1].left)/2
min_distance_z = min_distance_r = T(to_internal_units(min_tick_distance))
min_distance_r, min_distance_z / world_r_mid, min_distance_z
else
T(to_internal_units(min_tick_distance[1])),
T(to_internal_units(min_tick_distance[2])),
T(to_internal_units(min_tick_distance[3]))
end
else
(T(1e-5), T(1e-5) / (0.25 * grid.axes[1][end]), T(1e-5))
end
else
if !ismissing(min_tick_distance)
if min_tick_distance isa LengthQuantity
min_distance = T(to_internal_units(min_tick_distance))
min_distance, min_distance, min_distance
else
T(to_internal_units(min_tick_distance[1])),
T(to_internal_units(min_tick_distance[2])),
T(to_internal_units(min_tick_distance[3]))
end
else
(T(1e-5), T(1e-5), T(1e-5))
end
end

Right now, we set the default value for min_tick_distance to 1e-5, which are 10µm. Any structures finer than 10µm will not be well resolved in simulations using the default values. We should think about adjusting this value (and maybe max_tick_ratio) to something less hard-coded such that the default values describe any simulation (and not just "large scale" simulations) best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant