Please login with a confirmed email address before reporting spam
Posted:
8 years ago
15 juil. 2016, 03:58 UTC−4
Following this, as I am having a similar problem - want to define soil porosity that varies with (x,y) depending on distance under a sloping surface. x and y are said to be undefined variables, don't know how to make the geometrical coordinates available in the material property functions.
one thing I discovered along the way, that might or might not help your situation
- when inserting a function in physics settings if I used the "insert expression" icon instead of typing in the function it took the parameters with it. That is, when I typed just pw1 it didn't work, but when I selected the function from the insert expression tree it came with the parameters specified, ie pw1(t).
Hope someone can answer about the making the geometric coordinates available to functions... it must be a simple thing...
Following this, as I am having a similar problem - want to define soil porosity that varies with (x,y) depending on distance under a sloping surface. x and y are said to be undefined variables, don't know how to make the geometrical coordinates available in the material property functions.
one thing I discovered along the way, that might or might not help your situation
- when inserting a function in physics settings if I used the "insert expression" icon instead of typing in the function it took the parameters with it. That is, when I typed just pw1 it didn't work, but when I selected the function from the insert expression tree it came with the parameters specified, ie pw1(t).
Hope someone can answer about the making the geometric coordinates available to functions... it must be a simple thing...
Magnus Ringh
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
15 juil. 2016, 05:09 UTC−4
Hi,
The expression that you are using
J0*exp(-abs(sqrt(x^2+y^2+z^2)))*sin(2*pi*c_const/lambda*t)
should work in a 3D geometry with the default spatial coordinates x, y, and z. The time t, though, is undefined in a frequency domain study, so you need to define it as a constant. Also, you may want to "dedimensionalize" the x, y, and z variables in that expression (they have a unit of meters when using SI units).
Best regards,
Magnus Ringh, COMSOL
Hi,
The expression that you are using
J0*exp(-abs(sqrt(x^2+y^2+z^2)))*sin(2*pi*c_const/lambda*t)
should work in a 3D geometry with the default spatial coordinates x, y, and z. The time t, though, is undefined in a frequency domain study, so you need to define it as a constant. Also, you may want to "dedimensionalize" the x, y, and z variables in that expression (they have a unit of meters when using SI units).
Best regards,
Magnus Ringh, COMSOL
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
15 juil. 2016, 05:26 UTC−4
de-dimensionalising means writing variable x as x/1[m] each place it occurs, etc?
Is there any other trick for getting x, y, z available as variables in material property functions? I am still not succeeding in getting x and y to be recognised as variables....
de-dimensionalising means writing variable x as x/1[m] each place it occurs, etc?
Is there any other trick for getting x, y, z available as variables in material property functions? I am still not succeeding in getting x and y to be recognised as variables....
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
15 juil. 2016, 06:58 UTC−4
Dear Magnus Ringh,
You're right about the X, y, z dimensions, I actually did that but forgot to mention. In fact the formula dimensionality is correct (A/m^2).
Regarding the time dependence, do you mean that I have to define "t" as a variable in the definitions, and then do a Parameter Sweep study in the time range I desire? Will this work as a "time dependent" simulation?
Br,
MM
Dear Magnus Ringh,
You're right about the X, y, z dimensions, I actually did that but forgot to mention. In fact the formula dimensionality is correct (A/m^2).
Regarding the time dependence, do you mean that I have to define "t" as a variable in the definitions, and then do a Parameter Sweep study in the time range I desire? Will this work as a "time dependent" simulation?
Br,
MM
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
4 nov. 2016, 16:46 UTC−4
Dear Magnus,
I am trying to implement a temperature boundary condition, function of the spacial coordinates on a 2D Symmetric modeling ( r , z ) coordinates system. My question is how I can write the formula.
This is : 77 + 216.15 *( z - 0.2)
How I must right the Z coordinate?
Thank you.
Christian.
Dear Magnus,
I am trying to implement a temperature boundary condition, function of the spacial coordinates on a 2D Symmetric modeling ( r , z ) coordinates system. My question is how I can write the formula.
This is : 77 + 216.15 *( z - 0.2)
How I must right the Z coordinate?
Thank you.
Christian.