USER_PROBLEM: Estimate the thickness from the resistivity, by default.

The thikness of the current sheet is set to the square root of the
resistivity, if it is not set explictely in the parameter file.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2022-11-27 18:23:56 -03:00
parent 5793fe7810
commit 2561c11567

View File

@ -36,7 +36,7 @@ module user_problem
real(kind=8), save :: dens = 1.00d+00
real(kind=8), save :: bamp = 1.00d+00
real(kind=8), save :: bgui = 0.00d+00
real(kind=8), save :: dlta = 3.16d-03
real(kind=8), save :: dlta = 1.00d-02
real(kind=8), save :: pres = 5.00d-01
real(kind=8), save :: pmag = 5.00d-01
real(kind=8), save :: ptot = 1.00d+00
@ -118,14 +118,6 @@ module user_problem
status = 1
return
end if
call get_parameter("delta", dlta)
if (dlta <= 0.0d+00) then
if (verbose) &
call print_message(loc, &
"The initial thickness must be positive (delta > 0.0)!")
status = 1
return
end if
call get_parameter("resistivity", eta)
if (eta < 0.0d+00) then
if (verbose) &
@ -134,6 +126,15 @@ module user_problem
return
else
resistive = .true.
dlta = sqrt(eta)
end if
call get_parameter("delta", dlta)
if (dlta <= 0.0d+00) then
if (verbose) &
call print_message(loc, &
"The initial thickness must be positive (delta > 0.0)!")
status = 1
return
end if
pmag = 0.5d+00 * (bamp**2 + bgui**2)