CFD Online Logo CFD Online URL
Home > Forums > CFX

BC profile with non-standard variables

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

LinkBack Thread Tools Display Modes
Old   March 6, 2006, 05:12
Default BC profile with non-standard variables
Posts: n/a

I would like to define the inlet BC by a profile that is in .csv format. The thing is that the variable of my profile is mass-flux [kg s^-1 m^-2], which is a non-standard variable in Ansys-CFX10.0. I read in the R10 Modelling manuals (p.81) that this is in general possible. In fact, I can "Initialise Profile Data" correctly, i.e. without error message. Next, I select for my inlet BC "Use Profile Data" and click on "Generate Values" as it is written in the manuals. Unfortunately, the "Boundary Details" Panel remains unchanged, i.e. I do not get a new field where I could define the profile and variable name, respectively.

I hope somebody has done something similar already and could help me out! Thank you very much!

For completeness, this are the first lines of .csv file:



[Spatial Fields]



x [m],y [m],z [m],mf [kg s^-1 m^-2]



  Reply With Quote

Old   March 6, 2006, 15:50
Default Re: BC profile with non-standard variables
Posts: n/a
BC's have to be specified using one of the availale method (mass flow, velocity, total pressure etc). Since you have mass flux data then you just need to multiply it by the area of your inlet so that you can specify a mass flow BC. When you click "Generate Values", all CFX-Pre does is try to fill in the boundary condition fields using your data. Since there is no mass flux BC, then CFX-Pre can't enter the appropriate function for you, so you have to enter it manually. Enter a mass flow boundary condition using an expression such as:,y,z) * area()@BC_Name

where "Inlet" is the name of the function that was created when you read in the csv file, "mf" is the name of the data field in that function, and BC_Name is your boundary condition name. M
  Reply With Quote

Old   March 7, 2006, 05:09
Default Re: BC profile with non-standard variables
Posts: n/a
Hi Mike and all other readers,

Thank you for your comment. I did as you have suggested. Unfortunately, I still struggle at some point with the implementation of:,y,z)*area()@BC_Name

Firstly, it seems that the function 'area()' is not supported in CFXpre, which makes an immediate evaluation of the expression impossible. In detail, I receive following error: "Attempt to evaluate the CEL callback function 'area'. Although it is valid to create an expression that uses such a function, the preprocessor does not support its evaluation." I assume that it should work fine in the solver. If not, I still can replace


by the numerical value (which is available), although it would be less elegant.

Despite of the area-struggle, I have much more problems with the first part of the expression,y,z)

For testing, I firstly changed the units of 'mf' in my csv file from [kg s^-1 m^-2] to [kg s^-1]. Next, I defined an expression 'myVariable' =,y,z) (-> 'Inlet' = csv file function name, 'mf' = name of data field in this function). In the BC panel, I switched the inlet to 'Mass Flow Rate' and entered the expression 'myVariable'. After hitting 'Apply', I receive following error: "Parameter 'Mass Flow Rate' in Object '/FLOW/DOMAIN:Geometry/Boundary:Inlet 'BOUNDARY CONDITIONS/MASS AND MOMENTUM' has been assigned an expression that contains the following unavailable variables: x,y,z" (please check also my first posting for an example of my csv file).

In a second test, I changed the 'mf' units to [m s^-1] (although it does physically make no sense) and the inlet BC to 'Cart. Vel. Components' with u = v = 0 and w = 'myVariable'. Though, I did the same as before except of these two changes, CFXpre was NOT complaining in the latter approach.

I should also mention that the data of the csv file seems correct as an evaluation of the profile by the plot command in the 'Expression' tab gives reasonable results. Indeed, the two test cases differ only by the unit as one might expect.

Bottom line: for some reason, CFXpre does not like my mass flow profile definition. I have to say, after struggeling now for two days, I come to an end with my ideas. Any comment, suggestions, help on this problem is therefore highly appreciated!

  Reply With Quote

Old   March 7, 2006, 14:15
Default Re: BC profile with non-standard variables
Posts: n/a
Sorry - an error on my part - I don't think you can do a Mass Flow profile. Mass flow is a property of the whole boundary condition and therefore can not be a function of x,y, or z. I think you'll have to obtain/calculate a velocity profile for the boundary. Is the profile from other CFX results, so can you export a velocity profile from CFX-Post, I'm guessing not? M
  Reply With Quote

Old   March 7, 2006, 14:20
Default Re: BC profile with non-standard variables
Posts: n/a
You need to include the element area for the mass flux in your profile as well (which I assume was written from Post). You can then compute the local velocity as:

velocity = mass flux / (area * density)


velocity =,y,z) / (Inlet.area(x,y,z) * Density)

Regards, Robin
  Reply With Quote

Old   March 8, 2006, 03:24
Default Re: BC profile with non-standard variables
Posts: n/a
Thank you both Mike and Robin for your contributions!

Indeed, a velocity profile at the inlet is not an option in this case. Firstly, the data is not based on a previous CFX run. Secondly, the fluid of this high-pressure internal flow problem is treated as slightly compressible (slightly compressible because it is a liquid and not a gas).

If the fluid would have a constant density, I could of course use the velocity option instead as this means that the mass flow is linked to the velocity by a constant parameter (as you both pointed out). I guess may only option is then to use a constant mass flow over the entire boundary and live with the uncertainty.

And just a final remark: I don't know if I don't get the big picture right now, but why is it possible to export a mass flow profile from CFXpost when I cannot import the same again in CFXpre? Does everything have to be incompressible?

Thanks again big times for your views!
  Reply With Quote

Old   March 16, 2006, 02:40
Default Re: BC profile with non-standard variables
Posts: n/a
sure,please open the file,then correct all the variable is the same(including the word size )

by the way,you can use cel instead。
  Reply With Quote


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
3D UDF Paraboilc Velocity Profile (Can't Maintain) Sing FLUENT 12 August 7, 2017 06:25
problems orientating profile Ralf Schmidt FLUENT 1 March 30, 2014 10:00
Boundary Profile E61 FLUENT 0 January 5, 2011 09:13
problem with importing and exporting profile BC Gui CFX 2 July 26, 2007 08:50
Wind profile tom Phoenics 2 September 28, 2005 10:51

All times are GMT -4. The time now is 10:43.