CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

Particle momemtum source using USER_GETVAR for curl of velocity

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 13, 2012, 06:21
Default Particle momemtum source using USER_GETVAR for curl of velocity
  #1
New Member
 
pannsave
Join Date: Apr 2009
Posts: 25
Rep Power: 8
pannsave is on a distinguished road
Hello everybody,

I am using USER_GETVAR in particle user subroutine to obtain curl of fluid velocity. But I could not run the subroutine successfully,
I would be grateful if someone could suggest me solution for this problem.
User sub routine for particle momentum source are given below

#include "cfx5ext.h"
dllexport(pt_mom_source)
SUBROUTINE PT_MOM_SOURCE(NLOC,NRET,NARG,RET,ARG,CRESLT,
& CZ,DZ,IZ,LZ,RZ)
CC
CC
CC --------------------
CC Input
CC --------------------
CC
CC NRET - number of components in result
CC NARG - number of arguments in call
CC ARG() - (NARG) argument values
CC
CC --------------------
CC Modified
CC --------------------
CC
CC Stacks possibly.
CC
CC --------------------
CC Output
CC --------------------
CC
CC RET() - (NRET) return values
CC
CC --------------------
CC Details
CC --------------------
CC
CC================================================ ======================
C
C ------------------------------
C Preprocessor includes
C ------------------------------
#include "MMS.h"
#include "stack_point.h"
C
C
C ------------------------------
C Global Parameters
C ------------------------------
C
C
C ------------------------------
C Argument list
C ------------------------------
C
INTEGER NLOC,NARG,NRET
C
REAL ARG(NLOC,NARG), RET(NLOC,NRET)
C
CHARACTER CRESLT*(*)
C
INTEGER IZ(*)
CHARACTER CZ(*)*(1)
DOUBLE PRECISION DZ(*)
LOGICAL LZ(*)
REAL RZ(*)
C
C ------------------------------
C External routines
C ------------------------------
C
C
C ------------------------------
C Local Parameters
C ------------------------------
C
C
C ------------------------------
C Local Variables
C ------------------------------
C
C ------------------------------
C Stack pointers
C ------------------------------
__stack_point__ pCURL_VEL_FL
C
C================================================= ======================
C
C ---------------------------
C Executable Statements
C ---------------------------
C Initialise success flag.
      CRESLT = 'GOOD'
C
C================================================= ======================
C
C Argument variables stack:
C -------------------------
C Fluid density : DENSITY_FL = ARG(1,1)
C Particle fraction : VOLFRN_PT = ARG(1,2)
C Slip velocity : SLPVEL_PT = ARG(1,3)
C
C Return variables stack:
C -----------------------
C
C Source term : SOURCE = RET(1,1:3)
C
C================================================= ======================
C
C-----------------------------------------------------------------------
C Calculate the momentum source
C-----------------------------------------------------------------------
C
CALL USER_GETVAR ('water.Velocity.Curl', CRESLT,
     &  pCURL_VEL_FL,CZ,DZ,IZ,LZ,RZ)
C
C
CALL USER_MOMENTUM_SOURCE (RET(1,3),
& ARG(1,1),ARG(1,2),ARG(1,3),
& RZ(pCURL_VEL_FL))
C
END
C
SUBROUTINE USER_MOMENTUM_SOURCE (SOURCE,
& DENSITY_FL,VOLFRN_PT,SLPVEL_PT,
& CURL_VEL_FL)
C
C================================================= ======================
C Calculate the momentum source uisng lift force term
C================================================= ======================
C
C ------------------------------
C Preprocessor includes
C ------------------------------
C
#include "cfd_sysdep.h"
#include "cfd_constants.h"
C
C ------------------------------
C Argument list
C ------------------------------
C
REAL SOURCE(3),
& DENSITY_FL,VOLFRN_PT, SLPVEL_PT,
& CURL_VEL_FL(3)
C
C ------------------------------
C Local variables
C ------------------------------
C
REAL FACT
C
C ------------------------------
C Executable statements
C ------------------------------
C---- Calculate the momentum soure using lift force term
C
FACT = HALF*DENSITY_FL*VOLFRN_PT*SLPVEL_PT
C
SOURCE(1) = FACT*CURL_VEL_FL(1)
SOURCE(2) = FACT*CURL_VEL_FL(2)
SOURCE(3) = FACT*CURL_VEL_FL(3)
C
C
END



Thanks


pannsave
pannsave is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help.....Insufficient Catalogue Size Paresh Jain CFX 17 March 11, 2014 12:40
Normal particle velocity in particle deposition! Prashanth Fluent Multiphase 1 May 29, 2013 22:30
Access to the particle position and velocity Christoph_84 OpenFOAM 0 September 30, 2010 09:58
Particle User Source in ANSYS CFX Jun CFX 0 September 8, 2010 09:28
About Particle velocity of DPM in Fluent? long zhengwei FLUENT 0 March 13, 2009 05:02


All times are GMT -4. The time now is 07:44.