I m exploring how to program user functions in Syrthes (to define loads, boundary conditions,..).
I share my results so far and ask for help for the next step.
From the user guide I get that there are 2 levels how to do that:
(1)
a function in C-syntax describing the load (mat property or anything else) can be inserted directly in the syrthes input file *.syd. I have done this in the folder "interpreted_function" to describe the Diriclet boundary condition. The syntax is:
Code: Select all
CLIM_T_FCT= DIRICHLET 20+1.e-6*10.*tt 6
(A more simple, not-programmed Diriclet boundary condition would be for example
Code: Select all
CLIM_T= DIRICHLET 20 6
Thus, the appendix "_FCT" in "CLIM_T_FCT" means that a function describes the bc. Not appending "_FCT" means that a simple constant value describes the bc.
When employing this method (1), "CLIM_T_FCT", syrthes creates by itself a c-file, "user_fct.c" which contains the program code for that bc, thus which must not be coded by the user.
(2)
The user creates the c-file containing the code. I have done this in the folder "program". I created the c-file by modifying an example taken from the folder "usr_examples", this latter folder is always automatically created when creating a new calculation case using "syrthes.gui" or "syrthes4_create_case". The syntax is:
Code: Select all
CLIM_T_PROG= DIRICHLET 6
I ask for help now to do the following:
I want to apply a flux which is constant in space but variable over time. The variation over time is described by pairs of real numbers, being the time and the flux magnitude respectively. Linear interpolation in between the time points. I m not competent with the C-language, so can somebody please indicate me how to do that?
Many thanks,
Regards
Johannes_ACKVA
______________________________________________________________________
CODE-ASTER-courses at Ingenieurbüro für Mechanik, Germany
*** CODE-ASTER INTRO + CONTACT + MATERIAL
09-13 October 2017
*** CODE-ASTER DYNAMIC ANALYSIS
30 Nov - 01 Dec 2017