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

Compute parallel and perpendicular temperatures for the shock demo #150

Closed
henry2004y opened this issue Mar 1, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@henry2004y
Copy link
Owner

Show that temperature only increases in the perpendicular direction.

@henry2004y
Copy link
Owner Author

henry2004y commented Mar 4, 2024

We may have some errors in computing the thermal velocity. There are many different definitions of thermal velocity. Which one should we follow? https://en.wikipedia.org/wiki/Maxwell%E2%80%93Boltzmann_distribution#Typical_speeds
https://en.wikipedia.org/wiki/Thermal_velocity

Our current implementation

function sample(vdf::Maxwellian, nparticles::Int)
sqr2 = typeof(vdf.uth)(2)
# Convert from thermal speed to std
σ = vdf.uth / sqr2
v = σ .* randn(typeof(vdf.uth), 3, nparticles) .+ vdf.u0
end

uses the definition here. I made a mistake in converting from Maxwellian distribution to Normal distribution. It is known as the most probable speed in 3D. We should clarify it and probably check the dimensionality before sampling.

Creating new distribution and sampler: https://juliastats.org/Distributions.jl/stable/extends/

@henry2004y henry2004y added the bug Something isn't working label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant