one_equation_solve Subroutine

private subroutine one_equation_solve(this, velocity, pressure, temperature, salinity, plume_thickness, time)

Arguments

Type IntentOptional AttributesName
class(one_equation_melt), intent(inout) :: this
class(vector_field), intent(in) :: velocity

The velocity field of the plume into which fluid is melting.

class(scalar_field), intent(in) :: pressure

The water pressure at the interface where the melting occurs.

class(scalar_field), intent(in) :: temperature

The temperature of the plume into which fluid is melting.

class(scalar_field), intent(in) :: salinity

The salinity of the plume into which fluid is melting.

class(scalar_field), intent(in) :: plume_thickness

The thickness of the plume into which fluid is melting.

real(kind=r8), intent(in), optional :: time

The time at which the melting is being solved for. If not present then assumed to be same as previous value passed.


Contents

Source Code


Source Code

  subroutine one_equation_solve(this, velocity, pressure, temperature, &
                                 salinity, plume_thickness, time)
    class(one_equation_melt), intent(inout) :: this
    class(vector_field), intent(in)         :: velocity
      !! The velocity field of the plume into which fluid is melting.
    class(scalar_field), intent(in)         :: pressure
      !! The water pressure at the interface where the melting occurs.
    class(scalar_field), intent(in)         :: temperature
      !! The temperature of the plume into which fluid is melting.
    class(scalar_field), intent(in)         :: salinity
      !! The salinity of the plume into which fluid is melting.
    class(scalar_field), intent(in)         :: plume_thickness
      !! The thickness of the plume into which fluid is melting.
    real(r8), intent(in), optional          :: time
      !! The time at which the melting is being solved for. If not
      !! present then assumed to be same as previous value passed.
    call velocity%guard_temp(); call pressure%guard_temp()
    call temperature%guard_temp(); call salinity%guard_temp()
    call plume_thickness%guard_temp()
    if (.not. allocated(this%forcing_values)) then
      allocate(this%forcing_values, mold=temperature)
    else if (.not. same_type_as(this%forcing_values, temperature)) then
      deallocate(this%forcing_values)
      allocate(this%forcing_values, mold=temperature) 
    end if
    this%forcing_values = this%coef1*(temperature - this%melt_temp)*velocity%norm()
    call velocity%clean_temp(); call pressure%clean_temp()
    call temperature%clean_temp(); call salinity%clean_temp()
    call plume_thickness%clean_temp()
  end subroutine one_equation_solve