Skip to content
Snippets Groups Projects
Commit f019c514 authored by Florian Atteneder's avatar Florian Atteneder
Browse files

wip: change maxspeed implementation for tov star initial data

parent 3a777c26
No related branches found
No related tags found
1 merge request!101Refactor GRHD project
This commit is part of merge request !101. Comments created here will be created in the context of that merge request.
......@@ -132,12 +132,30 @@ end
end
# @with_signature function maxspeed(equation::Equation)
# @accepts vr
# @accepts α, βru, γrr
# γuurr = 1/γrr
# vru = γuurr * vr
# max_v = abs(α*vru - βru)
# @returns max_v
# end
@with_signature function maxspeed(equation::Equation)
@accepts vr
@accepts α, βru, γrr
@accepts vr, ρ, ϵ
@accepts α, γrr
@unpack eos = equation
cs2 = eos(SquareSpeedOfSound, Density, ρ, InternalEnergy, ϵ)
cs = sqrt(abs(cs2))
γuurr = 1/γrr
vru = γuurr * vr
max_v = abs(α*vru - βru)
v2 = vru*vr
A = α
λ0 = A*vru
W = 1/sqrt(1-v2)
λp = A/(1-v2)*(vru*(1-cs2)+cs/W*sqrt((1-v2*cs2)*γuurr-vru^2*(1-cs2)))
λm = A/(1-v2)*(vru*(1-cs2)-cs/W*sqrt((1-v2*cs2)*γuurr-vru^2*(1-cs2)))
max_v = absmax(λm, λ0, λp)
# TODO Can't use this method with bondi accretion test, need to use old version ...
@returns max_v
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment