|
[Sponsors] |
|
July 14, 2014, 12:44 |
Problem with units for additional variable
|
#1 |
Member
Hai Yu
Join Date: Mar 2009
Location: Harbin
Posts: 67
Rep Power: 17 |
Good day!
I have written a short fortran code, and linked as a user function, the name is "asource", then I use it as source for an additional variable with name "HL", the variable is dimensionless. if i write the Source as "asource", then i have error report: Bad expression value 'asource' detected in parameter 'Source' in object '/FLOW:Flow Analysis 1/DOMAIN:circ/SUBDOMAIN:Subdomain 1/SOURCES/EQUATION SOURCE:HL'. CEL error: The following unrecognised name was referenced: asource. if i write the source as "asource(1[])", then i have error report: Expression resolves to invalid units ('dimensionless') in value set for parameter 'Source' in object '/FLOW:Flow Analysis 1/DOMAIN:circ/SUBDOMAIN:Subdomain 1/SOURCES/EQUATION SOURCE:HL'. Expected units: 'kg m^-3 s^-1'. and if i write the source as "asource (1[kg m^-3 s^-1])", then i have error report: Bad expression value 'asource (1[kg m^-3 s^-1])' detected in parameter 'Source' in object '/FLOW:Flow Analysis 1/DOMAIN:circ/SUBDOMAIN:Subdomain 1/SOURCES/EQUATION SOURCE:HL'. CEL error: The dimensions of the argument to function 'asource' are inconsistent with expected dimensions. Argument dimensions resolve to 'kg m^-3 s^-1'; expected '<dimensionless>'. I just have no idea how to give the expression for the source item. Very thankful for any suggestion. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem in using of additional variable in wall velocity | adsladsl | CFX | 10 | May 31, 2015 19:29 |
OpenFoam-1.6-ext Allwmake compilation error - one last barrier | Pat84 | OpenFOAM Installation | 15 | July 25, 2012 21:49 |
Problem installing on 64bit with ver13 | jonititan | OpenFOAM Installation | 5 | May 12, 2006 18:42 |
Problem installing on 64bit with ver13 | jonititan | OpenFOAM Installation | 0 | April 28, 2006 05:45 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 20:09 |