Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
gotm.h File Reference
Include dependency graph for gotm.h:

Go to the source code of this file.

Functions

static void gotm_step (long n)
 The corresponding GOTM libraries need to be linked.
 
void event_defaults (void)
 The initialisation tries to call the relevant initialisation functions from GOTM, as they appear in the original gotm.F90 source code.
 
void event_viscous_term (void)
 Vertical diffusion is part of the "viscous terms" of the multilayer event loop.
 
void event_cleanup (void)
 The GOTM cleanup function deallocates Fortran fields etc.
 
void constant_NNT (double T_top, double S_const, double NN, scalar T)
 

Variables

scalar T = {-1}
 
scalar S = {-1}
 
const vector airsea_tau [] = {0.}
 The surface fluxes of momentum, heat and short-wave radiation are provided as surface fields by the calling solver.
 
const scalar airsea_heat_flux [] = 0.
 
const scalar airsea_swr_flux [] = 0.
 

Function Documentation

◆ constant_NNT()

void constant_NNT ( double  T_top,
double  S_const,
double  NN,
scalar  T 
)

Utility functions

This function uses GOTM to initialize a vertical temperature profile corresponding to a squared buoyancy frequency NN for a given constant salinity and top temperature.

Definition at line 301 of file gotm.h.

References _i, alpha, eqstate_eos_alpha(), foreach_layer, G, h, l, meanflow_rho_0, nl, T, x, z, and zb.

Here is the call graph for this function:

◆ event_cleanup()

void event_cleanup ( void  )

The GOTM cleanup function deallocates Fortran fields etc.

Event: cleanup (t = end)

Definition at line 289 of file gotm.h.

References gotm_clean_up().

Here is the call graph for this function:

◆ event_defaults()

void event_defaults ( void  )

The initialisation tries to call the relevant initialisation functions from GOTM, as they appear in the original gotm.F90 source code.

Event: defaults (i = 0)

The default density field is set to unity (times the metric).

We reset the multigrid parameters to their default values.

If the viscosity is non-zero, we need to allocate the face-centered viscosity field.

We also initialize the list of tracers to be advected with the VOF function \(f\) (or its complementary function).

We set limiting.

On trees, we ensure that limiting is also applied to prolongation and refinement.

We add the interface and the density to the default display.

We switch to a pure minmod limiter by default for increased robustness.

With the MUSCL scheme we use the CFL depends on the dimension of the problem.

On trees we need to replace the default bilinear refinement/prolongation with linear so that reconstructed values also use slope limiting.

The restriction/refine attributes of the charge density are those of a tracer otherwise the conservation is not guaranteed.

By default the permittivity is unity and other quantities are zero.

Definition at line 211 of file gotm.h.

References G, gotm_buoy_method, gotm_cnpar, kpp_init_kpp(), meanflow_depth, meanflow_gravity, meanflow_h, meanflow_post_init_meanflow(), meanflow_rho_0, mtridiagonal_init_tridiagonal(), nl, turbulence_post_init_turbulence(), turbulence_turb_method, and x.

Here is the call graph for this function:

◆ event_viscous_term()

void event_viscous_term ( void  )

Vertical diffusion is part of the "viscous terms" of the multilayer event loop.

We just copy the relevant fields into the corresponding GOTM fields, call GOTM and retrieve the updated fields.

Event: viscous_term (i++)

Definition at line 249 of file gotm.h.

References _i, airsea_heat, airsea_heat_flux, airsea_i_0, airsea_swr_flux, airsea_tau, airsea_tx, airsea_ty, dimension, foreach_layer, gotm_step(), h, scalar::i, i, meanflow_h, meanflow_s, meanflow_t, meanflow_u, meanflow_v, meanflow_z, point, S, T, u, vector::x, x, y, z, and zb.

Here is the call graph for this function:

◆ gotm_step()

static void gotm_step ( long  n)
static

The corresponding GOTM libraries need to be linked.

Implementation

It uses the relevant headers from the C interface to GOTM. Note that the GOTM environment variable need to point to the proper installation directory. The timestepping routine is based on its Fortran counterpart.

Definition at line 80 of file gotm.h.

References airsea_calc_fluxes, airsea_evap, airsea_heat, airsea_i_0, airsea_precip, airsea_set_sst(), airsea_set_ssuv(), airsea_tx, airsea_ty, dt, gotm_buoy_method, gotm_cnpar, scalar::i, input_do_input(), kpp_do_kpp(), meanflow_avmolu, meanflow_convectiveadjustment(), meanflow_cori, meanflow_coriolis(), meanflow_cp, meanflow_depth, meanflow_extpressure(), meanflow_friction(), meanflow_gravity, meanflow_h, meanflow_intpressure(), meanflow_nn, meanflow_nns, meanflow_nnt, meanflow_rad, meanflow_rho, meanflow_rho_0, meanflow_s, meanflow_salinity(), meanflow_shear(), meanflow_ss, meanflow_stratification(), meanflow_t, meanflow_temperature(), meanflow_u, meanflow_u_taub, meanflow_u_taus, meanflow_uequation(), meanflow_updategrid(), meanflow_v, meanflow_vequation(), meanflow_wequation(), meanflow_z, meanflow_z0b, meanflow_z0s, nl, observations_ext_press_mode, observations_get_all_obs(), omega, pi, S, T, time_julianday, time_secondsofday, turbulence_const_nuh, turbulence_const_num, turbulence_do_turbulence(), turbulence_gamh, turbulence_gams, turbulence_gamu, turbulence_gamv, turbulence_kappa, turbulence_nuh, turbulence_num, turbulence_nus, turbulence_turb_method, util_convert_fluxes(), x, and zeta.

Referenced by event_viscous_term().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ airsea_heat_flux

const scalar airsea_heat_flux[] = 0.

Definition at line 26 of file gotm.h.

Referenced by event_viscous_term().

◆ airsea_swr_flux

const scalar airsea_swr_flux[] = 0.

Definition at line 28 of file gotm.h.

Referenced by event_viscous_term().

◆ airsea_tau

const vector airsea_tau[] = {0.}

The surface fluxes of momentum, heat and short-wave radiation are provided as surface fields by the calling solver.

They are zero by default.

Definition at line 24 of file gotm.h.

Referenced by event_viscous_term().

◆ S

◆ T

scalar T = {-1}

General Ocean Turbulence Model interface for multilayer

This module interfaces the multilayer solver with GOTM.

Vertical diffusion of momentum, temperature and salinity is handled by GOTM.

The temperature and salinity fields are undefined by default. If the calling solver defines them, the corresponding GOTM vertical diffusion routines will be called.

Definition at line 16 of file gotm.h.

Referenced by constant_NNT(), event_viscous_term(), and gotm_step().