Professional Documents
Culture Documents
J2
I501
I1
(0, 0)
(1.5, 0.5)
J1
1.1
Visual Studio will open the solution file. You then proceed to Solution Explorer, and
double click usrsub2.f90.
1.2
Click on
Visual Studio will list lines in the solution that matches your search criteria. Pick the
result that indicates SUBROUTINE EXVEL.
1.3
kindef
bnddef
ijknow
wrapup
cycvar
IMPLICIT NONE
INTEGER (INT4) ::
K
REAL (REAL8)
::
UXT,
UYT,
REAL (REAL8), DIMENSION(5) :: RBC
REAL (REAL8)
::
XB,
YB
A, OMEGA, T
! INPUT PARAMETERS
!
!
NAMVEL
INPUT
1.4
! MODULE
!
!
!
'CYCVAR'
NCYCLE - CURRENT CYCLE NUMBER
TIME
- CURRENT TIME
DLTH
- TIME STEP FOR CURRENT CYCLE
!***************************************************************
! TEMPORARY ERROR MESSAGE - REPLACE WITH YOUR OWN CODE
!CALL USR_MESSAG ('$User subroutine EXVEL missing$')
!NSWRAP = 9
Deactivate
these lines
Insert the
following lines
OMEGA=TWO*PI/T
UXT=A*SIN(OMEGA*TIME)
ENDIF
RETURN
END SUBROUTINE EXVEL
1.5
Proceed to build the solution with Build Build Solution. If the subroutine has
been implemented as described, Visual Studio will output the following: Build: 1
succeeded, 0 failed, 0 skipped
1.6
Click
at the Tool Bar to open existing problem dialog window and select
velocity_sine_bc_0.ad.
Now, define two boundary conditions to apply motion constraints for uniaxial strain
and a user-defined boundary condition. To define the motion constraint for uniaxial
strain, select Boundaries on the Navigation Bar and then press New in the Dialog
Panel. In the dialog window that appears, Enter YVELZERO for the Name, select
Velocity for the Type, Y-velocity (Constant) for the Sub option and leave the
velocity field zero. Repeat this procedure to define the user-defined boundary
condition. Name it SINE, select Velocity for the Type, X, Y, R-velocity (User
EXVEL) for the Sub option, 1.0E-4 for the Parameter RBC(1), and 100 for the
Parameter RBC(2).
1.7
Now, apply the two boundary conditions. The XVELZERO boundary condition is
applied to all nodes (it allows no motion in the Y direction). The SINE boundary
condition is applied to the left boundary of the rod.
Press Boundary in the Parts Dialog Panel and then Block. In the window that
appears accept all default values to apply the velocity boundary condition. To apply
the user-defined boundary, press I Line. In the window that appears, select SINE for
Boundary name and accept the default values for the range.
(If you want to check that the boundary conditions have been applied correctly check
Boundaries under Additional components in the Plots Dialog Panel)
1.8
Now, press Controls on the Navigation Bar. In the Controls dialog panel set the
cycle limit to 10,000 and the time limit to 2.7E-4. This duration will be sufficient to
allow the gauges to capture the sinusoidal particle velocity in the rod.
Then press Output on the Navigation Bar. In the dialog panel, request Save files to
be written every 9.0E-5 ms
Press
on the Tool bar and load the settings file velocity_sine_bc.set to obtain
the following view (i.e. contour of the absolute velocity)
Press
on the Tool Bar to save your data and then press Run to compute the
problem. The calculation runs 690 cycles to completion, computing in less than a
minute.
1.9
Finally, plot X-velocity against time at the five gauges defined in the model.
Press History on the Navigation Bar and then press Single Variable Plots in the
Dialog Panel. In the dialog window that appears, select all five gauges and select
XVELOCITY as the Y variable. Press Apply to view the plots.
1.10