Many users are receiving emails regarding excessive amounts of log-in attempts, which are brute-force attempts to crack your password. We are working on a 2FA solution, so no action is needed yet. If you receive emails regarding "sign-in from new location", please check the IP address and if unknown, notify frza@dtu.dk immediately.

Commit f85dcd02 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

add source code from...

add source code from Q:\LAC\HAWC2\visualization\Visu_models\updated_DTU10MW_Blade_throw\control\Source\mech_brake
parent 70de6465
subroutine init_mech_brake(array1,array2)
use mech_brake_fcns
implicit none
!DEC$ ATTRIBUTES DLLEXPORT, C, ALIAS:'init_mech_brake'::init_mech_brake
real*8 array1(1000),array2(1)
! Input array1 must contain
!
! 1: constant 1 ; Fully deployed maximum brake torque [Nm]
! 2: constant 2 ; alpha, used in Q = tanh(omega*alpha), typically 1e2/Omega_nom
! 3: constant 3 ; Delay time for before brake starts to deploy [s]
! 4: constant 4 ; Time for brake to become fully deployed [s]
!
! Output array2 contains nothing
!
! Save parameters
Qmax = array1(1)
alpha = array1(2)
t_deploy = array1(3)
t_delay = array1(4)
! Initiate the dynamic variables
! Zero output
array2=0.d0
return
end subroutine init_mech_brake
!***********************************************************************
subroutine update_mech_brake(array1,array2)
use mech_brake_fcns
! use imsl
implicit none
!DEC$ ATTRIBUTES DLLEXPORT, C, ALIAS:'update_mech_brake'::update_mech_brake
real*8 array1(1000),array2(100)
! Input array1 must contain
!
! 1: general time ; Time [s]
! 2: constraint bearing1 shaft_rot 1 only 2 ; Generator LSS speed [rad/s]
! 3: dll inp 1 25 ; Command to deploy mechanical disc brake [0,1]
!
! Output array2 contains
!
! 1: Mech. brake LSS torque [Nm]
!
! Local vars
real*8 time,omega
time_old=time
time=array1(1)
dt=time-time_old
! Save input
omega=array1(2)
BrakeCommand=min(BrakeCommand + dt*array1(3)/t_deploy,1.d0)
! Output
array2(1)=tanh(omega*alpha)*BrakeCommand*Qmax
return
end subroutine update_mech_brake
!***********************************************************************

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "mech_brake", "mech_brake.vfproj", "{C3DAC6E4-340E-4105-9CC3-D1560C1EDDD8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C3DAC6E4-340E-4105-9CC3-D1560C1EDDD8}.Debug|Win32.ActiveCfg = Debug|Win32
{C3DAC6E4-340E-4105-9CC3-D1560C1EDDD8}.Debug|Win32.Build.0 = Debug|Win32
{C3DAC6E4-340E-4105-9CC3-D1560C1EDDD8}.Release|Win32.ActiveCfg = Release|Win32
{C3DAC6E4-340E-4105-9CC3-D1560C1EDDD8}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject ProjectType="typeDynamicLibrary" ProjectCreator="Intel Fortran" Keyword="Dll" Version="11.0" ProjectIdGuid="{C3DAC6E4-340E-4105-9CC3-D1560C1EDDD8}">
<Platforms>
<Platform Name="Win32"/></Platforms>
<Configurations>
<Configuration Name="Debug|Win32" ConfigurationType="typeDynamicLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" WarnInterfaces="true" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebugDLL"/>
<Tool Name="VFLinkerTool" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" GenerateDebugInformation="true" SubSystem="subSystemWindows" LinkDLL="true"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
<Configuration Name="Release|Win32" ConfigurationType="typeDynamicLibrary">
<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true"/>
<Tool Name="VFLinkerTool" SuppressStartupBanner="true" SubSystem="subSystemWindows" LinkDLL="true"/>
<Tool Name="VFResourceCompilerTool"/>
<Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
<Tool Name="VFCustomBuildTool"/>
<Tool Name="VFPreLinkEventTool"/>
<Tool Name="VFPreBuildEventTool"/>
<Tool Name="VFPostBuildEventTool"/>
<Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration></Configurations>
<Files>
<Filter Name="Header Files" Filter="fi;fd"/>
<Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
<Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
<File RelativePath=".\mech_brake.f90"/>
<File RelativePath=".\mech_brake_fcns.f90"/></Filter></Files>
<Globals/></VisualStudioProject>
module mech_brake_fcns
real*8 pi,degrad,raddeg
parameter(pi=3.14159265358979,degrad=0.0174532925,raddeg=57.2957795131)
real*8 Qmax,Qbrake,t_deploy,t_delay,alpha,BrakeCommand
real*8 time_old,dt
end module mech_brake_fcns
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment