|
[Sponsors] |
July 9, 2007, 11:44 |
user_calc_info and user_get_mesh_data
|
#1 |
Guest
Posts: n/a
|
Hello every one I need to have integral form of some variables for this I have to use user_calc_info, and user_get_mesh_data subroutines. In the help there is not enough explanation can some one help me Best regards
|
|
July 9, 2007, 12:40 |
Re: user_calc_info and user_get_mesh_data
|
#2 |
Guest
Posts: n/a
|
Dear mac,
The documentation for USER_CALC_INFO includes argument list and what they mean. There is description of the different items. What else do you need to know about it? For user_get_mesh_data, the doc also describes argument list, their meaaning and a table listing what you can get with it.. Any additional info needed, or clarified? What are you trying to compute?, or gather from the CFX solver ? or how are you approaching your calculation? Opaque |
|
July 10, 2007, 06:02 |
Re: user_calc_info and user_get_mesh_data
|
#3 |
Guest
Posts: n/a
|
Thx a lot Opaque Lets say we have expression in the forme div(vector) the integration of this expression over each control volume is equal to the sum of (Vetor.ni.Ai) Ai is the surface limeted the control volume and ni the normale to this surface. How to make subroutine to calculate this expression (Σ(Vetor.ni.Ai)) Best Regards
|
|
July 10, 2007, 13:02 |
Re: user_calc_info and user_get_mesh_data
|
#4 |
Guest
Posts: n/a
|
Dear mac,
If you are evaluating such a term, I guess the UserCEL function is being called either at a subdomain, or a boundary; therefore, the solver will be calling the function on elements instead of control volumes. Then, the you must return the contribution of that element to the control volume integral, and let the solver come up with the final value. Then, you need to compute vector dot area / "control volume sector volume". Then, in your UserCEL function you must make 4 calls: 1 - USER_CALC_INFO to determine the LOCALE and ENTITY for step 3 2 - USER_GETVAR to get the "vector variable" 3 - USER_GET_MESHDATA to get the Normal Area Vector. Here you must use WHAT='Normal Area Vector", WHERE=Faces|Integration Points depending if ENTITY=CENTRE|IP 4 - USER_GET_MESHDATA to get the Volume Sector using WHAT='Volume', and WHERE='Sectors' Then, pass the stack pointers into a local routine that will compute something like (be careful with indexing and array shapes). DO I = 1, N VAR(I) = (VECTOR(1,I)*AREA(1,I) +VECTOR(2,I)*AREA(2,I) +VECTOR(3,I)*AREA(3,I)) / VOLSEC(I) ENDDO Hope this helps Opaque |
|
July 16, 2007, 11:43 |
Re: user_calc_info and user_get_mesh_data
|
#5 |
Guest
Posts: n/a
|
Hello Opaque Thank you for your help I follow your advices and The compilation of subroutine was successful. however when I run the solve I've the message error:
+--------------------------------------------------------+ | ERROR #001100279 has occurred in subroutine ErrAction. | | Message: | | Error detected in subroutine USER_GET_MESHDATA Incorrect value of | | CERACT = |
|
July 16, 2007, 12:41 |
Re: user_calc_info and user_get_mesh_data
|
#6 |
Guest
Posts: n/a
|
Dear mac,
What version of ANSYS CFX are you using? 10.0+SP? or 11.0+Update1? Would you mind cutting and pasting the section of code around your call to USER_GET_MESHDATA? Not the whole routine, just the related parts to the call. Opaque |
|
July 17, 2007, 04:02 |
Re: user_calc_info and user_get_mesh_data
|
#7 |
Guest
Posts: n/a
|
Dear Opaque Thank you for your answer I'm using Ansys CFX 11.0 version.
For the part of my routine related to user clac inf and mesh data it's below: __stack_point__ pVector,pAREA,pVOLUME ACTION='GET' CERACT='STOP' CALL USER_CALC_INFO(WHO,ACTION,CVAR,LOCALE,ENTITY,WHEN, CALIAS, & CERACT,CRESLT,CZONE,ILOCS,ILOCF,IENTS,IENTF, CZ,DZ,IZ,LZ,RZ) CALL USER_GETVAR ('Fluid name.Vector' + ,creslt,pVector,cz,dz,iz,lz,rz) WHAT ='NORMAL Area Vector' WHERE = 'Faces' CERACT='STOP' CALL USER_GET_MESHDATA (WHAT,WHERE,CACTION,CERACT,CRESLT, & NVAR,pAREA,CZ,DZ,IZ,LZ,RZ) WHAT ='VOLUME' WHERE = 'Sectores' CERACT='STOP' CALL USER_GET_MESHDATA (WHAT,WHERE,CACTION,CERACT,CRESLT, & NVAR,pVOLUME,CZ,DZ,IZ,LZ,RZ) and after that I call local subroutine that will compute my integated expression in function of pAREA pVOLUME and RZ(pVector) |
|
July 17, 2007, 10:34 |
Re: user_calc_info and user_get_mesh_data
|
#8 |
Guest
Posts: n/a
|
Dear mac,
The documentation in 11.0 for USER_GET_MESHDATA seems to be broken because the names for the WHAT/WHERE are different from the values documented in 10.0 You should use: WHAT = 'Normal Area Vector' WHERE = 'Faces' WHAT = 'Volume' WHERE = 'Sectors' The naming follows the "every long word in capitalized". Be careful you typed "Sectores" Beware of NVAR, you are using it as a dummy integer. I could not see anything else wrong.. Hope this helps, Opaque |
|
August 7, 2007, 03:53 |
Re: user_calc_info and user_get_mesh_data
|
#9 |
Guest
Posts: n/a
|
Dear Opaque!
I am getteing the following error from USER_GET_MESHDATA routine in CFX11. I was not encountring this problem in CFX10. Could you please help me to resolve this problem? Error: GCNTRL stacktrace 1 USER_GET_MESHDATA,VolSec 2 USER_GET_MESHDATA,VolSec 3 USER_GET_MESHDATA,VolSec 4 USER_GET_MESHDATA,VolSec .... the FORTRAN command is as follows CALL USER_GET_MESHDATA('Volume','Sectors','RETURN','STO P' & ,CRESLT,NVNOD,pVNOD,CZ,DZ,IZ,LZ,RZ) Best regards, Merck |
|
|
|