|
[Sponsors] |
July 23, 2019, 06:51 |
"BADL" returned by User Fortran
|
#1 |
New Member
Zhipeng Yao
Join Date: Jul 2019
Location: Sydney
Posts: 4
Rep Power: 7 |
Hello!
I recently simulated the subcooled boiling flow in a vertical pipe with heated wall. With the influence of wall boiling, the near-wall flow field is different from adiabatic two-phase flow. It can be achieved by modifying the wall roughness to S=N*dw^3. So, I tried to correlate the roughness of heated wall with N(Nucleation Site Density) and dw(Bubble Departure Diameter) in User Fortran. Howerver, the case does not work properly and send error message "BADL". According to modeling guide, it means "variable cannot be computed on the current LOCALE". I want to get the N and dw of each grid on the wall, but stuck by this problem. Has anyone encountered a similar problem? User Fortran: #include "cfx5ext.h" dllexport(wall_rough) SUBROUTINE WALL_ROUGH ( & NLOC,NRET,NARG,RET,ARGS,CRESLT,CZ,DZ,IZ,LZ,RZ ) C ------------------------------ #include "parallel_partitioning.h" #include "cfd_memory_stacks.h" #include "MMS.h" #include "stack_point.h" C ------------------------------ INTEGER NLOC,NARG,NRET CHARACTER*(4) CRESLT REAL ARGS(NLOC,NARG), RET(NLOC,NRET) C ------------------------------ __stack_point__ pNSD,pBDD C================================================= ====================== C Initialise RET(1:NLOC*NRET) to zero. CALL SET_A_0( RET, NLOC*NRET ) C Get Nucleation Site Density CALL USER_GETVAR('Liquid | Vapor.Nucleation Site Density', & CRESLT,pNSD,CZ,DZ,IZ,LZ,RZ) IF (CRESLT.NE. 'GOOD') GO TO 999 C Get Bubble Departure Diameter CALL USER_GETVAR('Liquid | Vapor.Bubble Departure Diameter', & CRESLT,pBDD,CZ,DZ,IZ,LZ,RZ) IF (CRESLT.NE. 'GOOD') GO TO 999 C Calculate wall roughness by subroutine CALL USER_WALL_ROUGH_CAL( RET(1,1), & RZ(pNSD), RZ(pBDD), NLOC) C Set success flag. CRESLT = 'GOOD' C 999 CONTINUE C Send any diagnostics or stop requests via master processor IF (CRESLT .NE. 'GOOD') THEN CALL MESAGE( 'BUFF', 'UCF-WALL_ROUGH returned error:' ) CALL MESAGE( 'BUFF', CRESLT ) CALL MESAGE( 'BUFF-OUT', ' ' ) END IF C================================================= ====================== END C SUBROUTINE USER_WALL_ROUGH_CAL( WALLROUGH, & NSD, BDD, NLOC) C Purpose: WALLROUGH = NSD * BDD**3 C C Inputs INTEGER NLOC REAL NSD(1,NLOC), BDD(1,NLOC) C Outputs REAL WALLROUGH(NLOC) C Locals INTEGER ILOC C Function DO ILOC = 1, NLOC WALLROUGH(ILOC) = NSD(1,ILOC) * BDD(1,ILOC)**3 END DO C END Out File: +--------------------------------------------------------------------+ | Average Scale Information | +--------------------------------------------------------------------+ Domain Name : Default Domain Global Length = 5.5761E-02 Minimum Extent = 8.3138E-03 Maximum Extent = 3.6000E+00 Vapor.Density = 1.7251E+02 Vapor.Dynamic Viscosity = 1.6390E-05 Vapor.Velocity = 1.0000E-07 Vapor.Advection Time = 5.5761E+05 Vapor.Reynolds Number = 5.8690E-02 Vapor.Mass (Conservative) = 2.9908E-17 Vapor.Mass (Normalised) = 2.9908E-17 Vapor.Volume = 1.7337E-19 Vapor.Volume Fraction = 1.0000E-15 Liquid.Density = 1.0164E+03 Liquid.Dynamic Viscosity = 8.9400E-05 Liquid.Velocity = 1.0000E-07 Liquid.Advection Time = 5.5761E+05 Liquid.Reynolds Number = 6.3395E-02 +--------------------------------------------------------------------+ | ERROR #002100004 has occurred in subroutine Out_Scales_Flu. | | Message: | | The Reynolds number is outside of the range expected based on the | | Option selected for the TURBULENCE MODEL. Check this setting, | | the values of the properties, mesh scale, consistency of units | | and solution values in the input file. Execution will proceed. | +--------------------------------------------------------------------+ Liquid.Mass (Conservative) = 1.7622E-01 Liquid.Mass (Normalised) = 1.7622E-01 Liquid.Volume = 1.7337E-04 Liquid.Volume Fraction = 1.0000E+00 Liquid.Thermal Conductivity = 4.5700E-02 Liquid.Specific Heat Capacity at Constant Pressure = 1.4220E+03 Liquid.Prandtl Number = 2.7818E+00 Liquid | Vapor.Slip Reynolds Number = 1.3970E-11 UCF-WALL_ROUGH returned error: BADL ---------------------------------- Error in subroutine get_TWFTFC : Error calculating TWFTFC_FL1 GETVAR originally called by subroutine cal_CONVL_HTC Thank you for reading, I hope for your help. Last edited by Z.P. Yao; July 23, 2019 at 12:43. |
|
Tags |
badl, user fortran, wall roughness |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX User Fortran: Particle User Sources | hustxinxin | CFX | 0 | March 8, 2012 09:31 |
Particle Transport & Termination Control with User FORTRAN | Julian K. | CFX | 3 | January 12, 2012 10:48 |
Comparison between C/C++ and Fortran? | rick | Main CFD Forum | 45 | September 6, 2011 01:52 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
User Fortran and interior node information | John | CFX | 0 | August 26, 2008 23:24 |