plugin_src/load_history/sinusoidal.c File Reference

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "crusde_api.h"
Include dependency graph for sinusoidal.c:

Functions

const char * get_name ()
const char * get_version ()
const char * get_authors ()
PluginCategory get_category ()
const char * get_description ()
void request_plugins ()
void register_output_fields ()
void run ()
void clear ()
void init ()
void register_parameter ()
double get_value_at (unsigned int t)

Variables

double * p_d_max [100]
double * p_period_length [100]
double d_max
double period_length
int my_id = 0

Detailed Description

Sinusoidal load history that calculates a load height depending on the current time step (t), a period length (p) and the timestep when the load is supposed to be at maximum (dm):

\[ h(t) = \frac{h_m}{2} \left[ 1 + cos( \frac{2\,\pi}{p} (t - d_m) ) \right] \]

with hm being the maximum load height.


Function Documentation

void clear (  ) 

freeing mallocs

const char* get_authors (  ) 
PluginCategory get_category (  ) 

References LOADHISTORY_PLUGIN.

const char* get_description (  ) 
const char* get_name (  ) 
double get_value_at ( unsigned int  t  ) 

Returns the constrained load depending on the current timestep at point (x,y)

References crusde_get_current_load_component(), d_max, my_id, p_d_max, p_period_length, period_length, and PI.

const char* get_version (  ) 
void init (  ) 

empty

void register_output_fields (  ) 

empty

void register_parameter (  ) 

Register parameters this load function claims from the input.

References crusde_get_current_load_component(), crusde_register_param_double(), get_category(), my_id, p_d_max, and p_period_length.

void request_plugins (  ) 

empty

void run (  ) 

empty


Variable Documentation

double d_max

day of maximum load [d]

Referenced by get_value_at().

int my_id = 0
double* p_d_max[100]

day of maximum load [d]

Referenced by get_value_at(), and register_parameter().

double* p_period_length[100]

number of days in a cycle [d]

Referenced by get_value_at(), and register_parameter().

double period_length

number of days in a cycle [d]

Referenced by get_value_at().


Generated on Tue Feb 16 15:18:28 2010 for CrusDe by  doxygen 1.6.1-20091004