Ansys Learning Forum › Forums › Discuss Simulation › General Mechanical › Harmonic analysis of a beam in water using HROCEAN › Reply To: Harmonic analysis of a beam in water using HROCEAN
Your results seem to be all zero. Here's a qa test. Maybe you can modify it to do what you want.
/title,ocha-4s,vkumar,verify hrocean harmonic loading,PIPE288
/COM,***************************************************************************
/COM, TEST OBJECTIVE: Perform harmonic analysis on PIPE288 using HROCEAN command
/COM,
/COM,
/COM, ELEMENTS: PIPE288(KEYOPT(12)=3)
/COM,Â
/COM, MATERIAL: ELASTIC
/COM,
/COM, DESCRIPTION:Â
/COM, A vertical tube consisting of only one element fully submergedÂ
/COM, in water is constrained in all degrees of freedom at bottom node. Â Â Â Â Â Â
/COM, The wave loading is applied to the model and harmonic analysis is       Â
/COM, performed using the ocean wave table to extract the reactions and       Â
/COM, tip displacements.The data base of case1 is saved and reused in case2.Â
/COM,
/COM,
/COM, Case1: The wave is applied and harmonic analysis is done withÂ
/COM, Â Â Â Â HROCEAN,HARMONIC command using ocean wave table
/COM, Â Â Â Â
/COM,
/COM, Case2: The real and imaginary forces of the wave obtained fromÂ
/COM, Â Â Â Â Case1 is applied at nodes to same model using keyopt(12)=2
/COM, Â Â Â Â and by setting a tiny wave height in ocean wave table. Ocean
/COM Â Â Â Â environment is deleted using HROCEAN,OFF and by not issuing Â
/COM, Â Â Â Â ocean id to pipe section. The harmonic analysis is performedÂ
/COM Â Â Â Â at wave excitation frequency using HARFRQ.
/COM,
/COM, Expected Results: 1. The reactions and tip displacements obtainedÂ
/COM,            in complex form  from Case1 and Case2 should match.Â
/COM,Â
/COM,******************************************************** Â Â Â Â Â Â Â
/COM, CASE 1:Harmonic analysis using HROCEAN,HARMONIC
/COM,********************************************************Â
/out,scratch
/COM, Input Parameters
noe   =1               ! number of elements
pi   =3.14159265           ! circumference/diameter of a circle
L Â Â Â =100 Â Â Â Â Â Â Â Â Â Â Â Â Â ! length of pipe
ER Â Â =2.10e+11 Â Â Â Â Â Â Â Â Â Â Â ! Young's modulus of pipe
PRATIO =0.0 Â Â Â Â Â Â Â Â Â Â Â Â Â ! Poisson's ratio
Do   =0.533             ! outer diameter of pipe
Di   =0.508             ! inner diameter of pipe
Thk   =(Do-Di)/2           ! thickness of pipe Â
RHOP Â =0.00000030 Â Â Â Â Â Â Â Â Â Â ! density of pipe
RhoW Â =1025.0 Â Â Â Â Â Â Â Â Â Â Â Â ! density of waterÂ
Cd   =1.0              ! drag coefficient
Cm   =1.0              ! inertia coefficient  Â
Depth  =100.0             ! depth of ocean
H Â Â Â =4.0 Â Â Â Â Â Â Â Â Â Â Â Â Â ! height of wave
T Â Â Â =10.0 Â Â Â Â Â Â Â Â Â Â Â Â Â ! time period of wave
sfvel  =0.2              ! velocity of current at top surface Â
depvel =0.3 Â Â Â Â Â Â Â Â Â Â Â Â Â ! velocity of current at ocean floor Â
NPHASE =8
          Â
/PREP7 Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
/COM, Material properties
MP,EX Â ,1,ER
MP,PRXY,1,PRATIO
MP,DENS,1,RhoP
MP,DENS,2,RhoW
/COM, Element and keyopts
ET,1,PIPE288
KEYOPT,1,12,3
KEYOPT,1,15,0
KEYOPT,1,6,1
/COM, Section properties
SECTYPE,1,PIPE
SECDATA,Do,Thk
/COM, Finite element modeling
N,1,,,-90
N,2,,,-L
E,1,2
SAVE,,DB
/COM, Ocean Basic data
OCTYPE,BASIC
OCDATA,Depth,2,,0,,0
OCTABLE,,,Cd,,0,Cm
/COM, Ocean Wave data
OCTYPE,WAVE
OCDATA,0 Â Â Â Â Â Â Â Â Â ! Small Amplitude Airy Wave theory
OCTABLE,H,T,0
FINISH
/SOLU
ANTYPE,HARM
ACEL,,,9.8
D,2,ALL
TIME,1e-011
HROCEAN,HARMONIC,NPHASE
OUTRES,ALL,ALL
OUTPR,ALL,ALL
SOLVE
FINISH
/POST26
ESOL,2,1,1,f,x,FX_1
ESOL,3,1,1,f,z,FZ_1
ESOL,4,1,2,f,x,FX_2
ESOL,5,1,2,f,z,FZ_2
NSOL,6,1,U,X,UX_TIP
PRVAL,2,3,4,5,6
EXTREME,2,5,6
FINISH
/POST1
SET,1,,,real
PRNLD,F
SET,1,,,imag
PRNLD,F
SET,1,,,real
PRRSOL,F
*GET,FX1_REAL,NODE,2,RF,FX,REAL
*GET,UX1_REAL,NODE,1,U,X,,REAL
SET,1,,,imag
PRRSOL,F
*GET,FX1_IMAG,NODE,2,RF,FX,IMAG
*GET,UX1_IMAG,NODE,1,U,X,,IMAG
FINISH
PARSAVE
PARRES
/out,
/COM************************************************************
/COM Expected results: The reaction forces and tip displacementsÂ
/COM Â Â Â Â Â Â Â Â Â for case 1 and 2 should match
/COM************************************************************Â
/COM Real reaction for case 1
 *STATUS,FX1_REAL
/COM,***********************************************************
/COM Imaginary reaction for case 1
 *STATUS,FX1_IMAG
/COM,***********************************************************
/COM Real component of displacement for case 1
*STATUS,UX1_REAL
/COM,***********************************************************
/COM Imaginary component of displacement for case 1
*STATUS,UX1_IMAG
/COM,***********************************************************
/CLEAR,NOSTART
/COM,************************************************************** Â Â Â Â Â Â Â
/COM, CASE 2:HROCEAN,OFF and HARFRQ
/COM,**************************************************************Â
PARRES
/out,scratch
/PREP7
RESUME,,DB
/COM, Ocean Basic data
OCTYPE,BASIC
OCDATA,Depth,2,,0,,0
OCTABLE,,,Cd,0,0,Cm
/COM, Ocean Wave data
OCTYPE,WAVE
OCDATA,0 Â Â Â Â Â Â Â Â Â ! Small Amplitude Airy Wave theory
OCTABLE,1e-011,1e+11,0
/SOLU
ANTYPE,HARMIC
HROCEAN,OFF
OCDELETE,all !2,3,1
HARFRQ,0,1/T
ACEL,,,9.8
NSUBST,10
TIME,1e-11
F,1,FX,1.9901,-33.470
F,2,FX,1.8871,-32.592Â
D,2,ALL
OUTRES,ALL,ALL
SOLVE
FINISH
/POST26
NUMVAR,100
ESOL,12,1,1,F,X
ESOL,13,1,1,F,Z
ESOL,14,1,2,F,X
ESOL,15,1,2,F,Z
NSOL,16,1,U,X,UX_TIP
PRVAR,12,13,14,15,16
FINISH
/POST1
FLIST
SET,1,,,real
PRNLD,F
SET,1,,,imag
PRNLD,F
SET,1,,,real
PRRSOL,F
*GET,FX2_REAL,NODE,2,RF,FX,REAL
*GET,UX2_REAL,NODE,1,U,X,,REAL
SET,1,,,imag
*GET,FX2_IMAG,NODE,2,RF,FX,IMAG
*GET,UX2_IMAG,NODE,1,U,X,,IMAG
PRRSOL,F
FINISH
PARSAVE
PARRES
/out,
/COM,***********************************************************
/COM Real reaction for case 2
 *STATUS,FX2_REAL
/COM,***********************************************************
/COM Imaginary reaction for case 2
 *STATUS,FX2_IMAG
/COM,***********************************************************
/COM Real component of displacement for case 2
*STATUS,UX2_REAL
/COM,***********************************************************
/COM Imaginary component of displacement for case 2
*STATUS,UX2_IMAG
/COM,***********************************************************
/EXIT,NOSAVE