|
Basilisk CFD
Adaptive Cartesian mesh PDE framework
|
#include "gotm/common.h"#include <gotm/gotm/gotm.h>#include <gotm/meanflow/meanflow.h>#include <gotm/meanflow/coriolis.h>#include <gotm/meanflow/uequation.h>#include <gotm/meanflow/vequation.h>#include <gotm/meanflow/friction.h>#include <gotm/meanflow/shear.h>#include <gotm/meanflow/stratification.h>#include <gotm/meanflow/salinity.h>#include <gotm/meanflow/temperature.h>#include <gotm/meanflow/convectiveadjustment.h>#include <gotm/util/convert_fluxes.h>#include <gotm/util/tridiagonal.h>#include <gotm/util/eqstate.h>#include <gotm/turbulence/turbulence.h>#include <gotm/turbulence/kpp.h>#include <gotm/airsea/airsea.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. |
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.
The GOTM cleanup function deallocates Fortran fields etc.
Event: cleanup (t = end)
Definition at line 289 of file gotm.h.
References gotm_clean_up().
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.
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.
The corresponding GOTM libraries need to be linked.
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().
Definition at line 26 of file gotm.h.
Referenced by event_viscous_term().
Definition at line 28 of file gotm.h.
Referenced by event_viscous_term().
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().
| scalar S = {-1} |
Definition at line 16 of file gotm.h.
Referenced by event_acceleration(), event_advance(), event_viscous_term(), foreach_segment(), gotm_step(), half_column(), and update_saint_venant().
| scalar T = {-1} |
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().