Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

specifying varing coefficient - interpolation function

Please login with a confirmed email address before reporting spam

Hi all,

I would like to specify varing htc via interpolation function and apply it to a heat flux boundary condition. I am attaching a sample file.

- Model: 2D-axisymetric (i.e.cylinder, mm), heat transfer in solids, and s-s case
- Features: a heat flux boundary condition with heat transfer coefficient varing along line (not as constant). assigned via interpolation function
- Error: Wrong number of function arguments, Number of arguments expected: 1'

I built a simple 2D axisymetric, heat transfer in solids, and s-s case and added a heat flux boundary condition with heat transfer coefficient which is varing along line. An external htc data set was imported using interpolation function under Global Parameters.

t f(t)
1 50
2 52
3 54
.. ..
399 52
400 50

1) I can see a plot without assiging units, but with units (argument: mm, function: W/(m^2*K)) a horizontal line is only appeared. What should I consider?

2) I am facing the same error message 'wrong number of function arguments' when running the simulation. I believe the number is ok but it repeatedly says it.

Any advice and help will be appreciated,

mg

2 Replies Last Post 23 janv. 2013, 08:57 UTC−5
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 9 janv. 2013, 15:23 UTC−5
Hi

when you refer to a function you need to give the argument so try rather htc(z) this will work as "z" will be taken along the entity selected (boundary in 2D-axi = line), and as it's a vertical line it will map z from 0 to 0.4 meters.

Next you need to take care with the units, in your global function definition the variable name "t" is a dummy name but you defined it in meters unit, while I suspect that its rather "mm" that should be used, as your tube has length of 400 but the geometry is in mm (the units of the geometry is only a convenience scaling for geometrical objects, COMSOL continues to use default SI units in meters !)

There is another way to import geometrical linked data, as a "Model - Definitions - functions" & import from file, tick on: use space coordinates for arguments. then your function "utc" will be tagged internally as an implicit function and the reference to the space coordinates will be done without needing to refer to them explicitly. But I'm not sure how this works for 1D functions in 2D space, check the doc and make it a try. This is very efficient to map experimental data onto your model



--
Good luck
Ivar
Hi when you refer to a function you need to give the argument so try rather htc(z) this will work as "z" will be taken along the entity selected (boundary in 2D-axi = line), and as it's a vertical line it will map z from 0 to 0.4 meters. Next you need to take care with the units, in your global function definition the variable name "t" is a dummy name but you defined it in meters unit, while I suspect that its rather "mm" that should be used, as your tube has length of 400 but the geometry is in mm (the units of the geometry is only a convenience scaling for geometrical objects, COMSOL continues to use default SI units in meters !) There is another way to import geometrical linked data, as a "Model - Definitions - functions" & import from file, tick on: use space coordinates for arguments. then your function "utc" will be tagged internally as an implicit function and the reference to the space coordinates will be done without needing to refer to them explicitly. But I'm not sure how this works for 1D functions in 2D space, check the doc and make it a try. This is very efficient to map experimental data onto your model -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 janv. 2013, 08:57 UTC−5
Thank you for your comment.

mg
Thank you for your comment. mg

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.