Ejemplo n.º 1
0
def soln_momentum_density(face_mesh_velocity, outward_directed_normal_covector,
                          coords, time, dim):
    return hydro.rest_mass_density(
        coords, time, _soln_mean_velocity(dim), _soln_wave_vector(dim),
        _soln_pressure, _soln_adiabatic_index,
        _soln_perturbation_size) * hydro.spatial_velocity(
            coords, time, _soln_mean_velocity(dim), _soln_wave_vector(dim),
            _soln_pressure, _soln_adiabatic_index, _soln_perturbation_size)
Ejemplo n.º 2
0
def soln_energy_density(face_mesh_velocity, outward_directed_normal_covector,
                        coords, time, dim):
    velocity = hydro.spatial_velocity(coords, time, _soln_mean_velocity(dim),
                                      _soln_wave_vector(dim), _soln_pressure,
                                      _soln_adiabatic_index,
                                      _soln_perturbation_size)
    int_energy = hydro.specific_internal_energy(coords, time,
                                                _soln_mean_velocity(dim),
                                                _soln_wave_vector(dim),
                                                _soln_pressure,
                                                _soln_adiabatic_index,
                                                _soln_perturbation_size)
    return hydro.rest_mass_density(
        coords, time, _soln_mean_velocity(dim), _soln_wave_vector(dim),
        _soln_pressure, _soln_adiabatic_index, _soln_perturbation_size) * (
            0.5 * np.dot(velocity, velocity) + int_energy)
Ejemplo n.º 3
0
def soln_specific_enthalpy(coords, time):
    return hydro.specific_enthalpy_relativistic(coords, time,
                                                _soln_mean_velocity(),
                                                _soln_wave_vector(),
                                                _soln_pressure,
                                                _soln_adiabatic_index,
                                                _soln_perturbation_size)
Ejemplo n.º 4
0
def soln_flux_energy_density(face_mesh_velocity,
                             outward_directed_normal_covector, coords, time,
                             dim):
    velocity = hydro.spatial_velocity(coords, time, _soln_mean_velocity(dim),
                                      _soln_wave_vector(dim), _soln_pressure,
                                      _soln_adiabatic_index,
                                      _soln_perturbation_size)
    pressure = hydro.pressure(coords, time, _soln_mean_velocity(dim),
                              _soln_wave_vector(dim), _soln_pressure,
                              _soln_adiabatic_index, _soln_perturbation_size)
    return flux.energy_density_flux_impl(
        soln_momentum_density(face_mesh_velocity,
                              outward_directed_normal_covector, coords, time,
                              dim),
        soln_energy_density(face_mesh_velocity,
                            outward_directed_normal_covector, coords, time,
                            dim), velocity, pressure)
Ejemplo n.º 5
0
def soln_specific_internal_energy(face_mesh_velocity,
                                  outward_directed_normal_covector, coords,
                                  time, dim):
    return hydro.specific_internal_energy(coords, time,
                                          _soln_mean_velocity(dim),
                                          _soln_wave_vector(dim),
                                          _soln_pressure,
                                          _soln_adiabatic_index,
                                          _soln_perturbation_size)
Ejemplo n.º 6
0
def soln_tilde_d(face_mesh_velocity, outward_directed_normal_covector,
                 outward_directed_normal_vector, coords, time, dim):
    rho = soln_rest_mass_density(face_mesh_velocity,
                                 outward_directed_normal_covector,
                                 outward_directed_normal_vector, coords, time,
                                 dim)
    W = hydro.lorentz_factor(coords, time, _soln_mean_velocity(dim),
                             _soln_wave_vector(dim), _soln_pressure,
                             _soln_adiabatic_index, _soln_perturbation_size)
    # for smooth flow, sqrt_det_spatial_metric = 1
    return rho * W
Ejemplo n.º 7
0
def soln_tilde_s(face_mesh_velocity, outward_directed_normal_covector,
                 outward_directed_normal_vector, coords, time, dim):
    tilde_d = soln_tilde_d(face_mesh_velocity,
                           outward_directed_normal_covector,
                           outward_directed_normal_vector, coords, time, dim)
    W = hydro.lorentz_factor(coords, time, _soln_mean_velocity(dim),
                             _soln_wave_vector(dim), _soln_pressure,
                             _soln_adiabatic_index, _soln_perturbation_size)
    h = soln_specific_enthalpy(face_mesh_velocity,
                               outward_directed_normal_covector,
                               outward_directed_normal_vector, coords, time,
                               dim)
    # for smooth flow, metric = identity ==> v_lower = v_upper
    v_lower = soln_spatial_velocity(face_mesh_velocity,
                                    outward_directed_normal_covector,
                                    outward_directed_normal_vector, coords,
                                    time, dim)
    return tilde_d * W * h * v_lower
Ejemplo n.º 8
0
def soln_tilde_tau(face_mesh_velocity, outward_directed_normal_covector,
                   outward_directed_normal_vector, coords, time, dim):
    rho = soln_rest_mass_density(face_mesh_velocity,
                                 outward_directed_normal_covector,
                                 outward_directed_normal_vector, coords, time,
                                 dim)
    eps = soln_specific_internal_energy(face_mesh_velocity,
                                        outward_directed_normal_covector,
                                        outward_directed_normal_vector, coords,
                                        time, dim)
    v = soln_spatial_velocity(face_mesh_velocity,
                              outward_directed_normal_covector,
                              outward_directed_normal_vector, coords, time,
                              dim)
    v2 = v.dot(v)
    W = hydro.lorentz_factor(coords, time, _soln_mean_velocity(dim),
                             _soln_wave_vector(dim), _soln_pressure,
                             _soln_adiabatic_index, _soln_perturbation_size)
    # for smooth flow, sqrt_det_spatial_metric = 1
    return W**2 * (rho * (eps + v2 * W / (W + 1.0)) + _soln_pressure * v2)
Ejemplo n.º 9
0
def soln_mass_density(coords, time):
    return hydro.rest_mass_density(coords, time, _soln_mean_velocity(),
                                   _soln_wave_vector(), _soln_pressure,
                                   _soln_adiabatic_index,
                                   _soln_perturbation_size)
Ejemplo n.º 10
0
def soln_specific_internal_energy(coords, time):
    return hydro.specific_internal_energy(coords, time, _soln_mean_velocity(),
                                          _soln_wave_vector(), _soln_pressure,
                                          _soln_adiabatic_index,
                                          _soln_perturbation_size)
Ejemplo n.º 11
0
def soln_lorentz_factor(coords, time):
    return hydro.lorentz_factor(coords, time, _soln_mean_velocity(),
                                _soln_wave_vector(), _soln_pressure,
                                _soln_adiabatic_index, _soln_perturbation_size)