How to specify a value on a this surface?
I'd likt to specify some value on a thin surface inside a flow domain, hope it is possible. For example, temperature on the thin surface is fixed. I urgent need your guys help. Thanks
windhair1 |
Re: How to specify a value on a this surface?
define where you want to put data
|
Re: How to specify a value on a this surface?
The command file is like
>>CREATE PATC PATCH TYPE 'THIN SURFACE' PATCH NAME 'INTERWALL' BLOCK NAME 'FUELBLOCK' HIGH I PATCH LOCATION 17 17 1 40 1 1 END Add in USRSRC CALL IPALL('INTERWALL', '*', ......) DO 100 I = 1, NPT INODE = IPT(I) VARBCS(ISCA2, IPHASE, INODE) = 1.0 100 CONTINUE But the results show zero value of scalar2 in whole fluid domain. How to deal with it? Thanks |
Re: How to specify a value on a this surface?
First of all, you need to use USRBCS to access the VARBCS array (USRSRC is for setting SU and SP). If you are actually in USRBCS, you have to set the IUBCSF flag (see top of routine) to indicate whether the condition is constant, changing with iteration, or changing with timestep.
Secondly, how are you defining ISCA2? Accessing the scalar arrays is a bit tricky. Try something like: CALL GETVAR('USRBCS','SCAL ',ISCAL) CALL GETSCA('USER SCALAR2',IS2,CWORK) ISCA2 = ISCAL + IS2 - 1 CALL IPALL('INTERWALL', '*','PATCH', + 'CENTERS',IPT,NPT,CWORK,IWORK) DO I = 1, NPT INODE = IPT(I) VARBCS(ISCA2, IPHASE, INODE) = 1.0 ENDDO Note that scalar 1 is in the 0th position, which is why we subtract 1. Also note the two spaces in the 'SCAL ' string used by GETVAR. All var names in GETVAR are exactly 6 characters padded with spaces. If this is confusing, call the Pittsburgh CFX support line for a very detailed technical note on CFX-4 User FORTRAN written by some guy named Jeff. Hope this helps, Jeff |
Re: How to specify a value on a this surface?
Thanks, It works now. But I still need further help on this topic, refer to the following post.
http://www.cfd-online.com/Forum/cfx.cgi?read=6087 |
All times are GMT -4. The time now is 21:18. |