Magnus Ringh
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
10 months ago
Jan 2, 2024, 9:59 a.m. EST
Hi Ashish,
The arguments in the analytic functions are internal to them, used to define the function as a function of one or more variables. When calling the analytic function, you must do so with a variable that is defined in the model. In your case, you can call both an1
and an2
with t
, for example, which is the predefined variable for time in your model. On the other hand, s
is not known outside of an2
(but s1
and s2
would be, as surface parameterizations in 3D, for example; s
is predefined as an edge parameterization in 2D).
Best regards,
Magnus
Hi Ashish,
The arguments in the analytic functions are internal to them, used to define the function as a function of one or more variables. When calling the analytic function, you must do so with a variable that is defined in the model. In your case, you can call both `an1` and `an2` with `t`, for example, which is the predefined variable for time in your model. On the other hand, `s` is not known outside of `an2` (but `s1` and `s2` would be, as surface parameterizations in 3D, for example; `s` is predefined as an edge parameterization in 2D).
Best regards,
Magnus
Please login with a confirmed email address before reporting spam
Posted:
10 months ago
Jan 5, 2024, 9:58 a.m. EST
Dear Magnus,
Thanks for writing back to me.
However, my issue is little different. In the 'variables' section you should find an variable called 'A'
where, A=(exp(-5.724e-10an2(s)) - 1.0)(0.5/(0.00025an2(s) + 1.0) - 0.5/(0.00025an1(t) + 1.0))^2(1.891e+5an1(t) - 3.782e+8(2.0/(0.00025an1(t) + 1.0) + (0.00025an1(t) + 1.0)^2)(0.00025an1(t) + 1.0)(8.333e-5an1(t) + 0.3333) + 7.564e+8) + (exp(-5.724e-10an2(s)) - 1.0)(0.5/(0.00025an2(s) + 1.0) - 0.5/(0.00025an1(t) + 1.0))^2(1.891e+5an1(t) - 3.782e+8(2.0/(0.00025an1(t) + 1.0) + (0.00025an1(t) + 1.0)^2)((0.00025an1(t) + 1.0)^2 + (0.00025an1(t) + 1.0)(8.333e-5an1(t) + 0.3333)) + 7.564e+8) + (exp(-5.724e-10an2(s)) - 1.0)(0.5/(0.00025an2(s) + 1.0) - 0.5/(0.00025an1(t) + 1.0))(0.5(0.00025an2(s) + 1.0)^2 - 0.5(0.00025an1(t) + 1.0)^2)(94550.0an1(t) + 6.051e+15/(an1(t) + 4000.0)^2 - (2.017e+15(2.0/(0.00025an1(t) + 1.0) + (0.00025an1(t) + 1.0)^2)(0.00025*an1(t) + 1.0))/(an1(t) + 4000.0)^2 + 3.782e+8)
where 't' varies from 0 to 1000 seconds( 1000 seconds is the total simulation time period). The time step (lets say dt) is 1 second.
's' on the other hand is a smaller time step which varies within the confinements of each time step. In other words,
when t=1 second , s varies from 0 to 1.
when t=2 second , s varies from 1 to 2.
when t=3 second , s varies from 2 to 3.
..
.
.
.
when t=800 second , s varies from 799 to 800.
..
.
.
when t=1000 second , s varies from 999 to 1000.
To acheive this i used two analytic functions "an1(t)" and "an2(s)" . But the expression for A(shown above) shows orange . This is because 'an2(s)' is not recognised. ( I am pretty sure an1(t) only seems to be recognised as perhaps Comsol perceives it to be time , which is right by the way).
Please help me with this, coz as i said earlier i am terribly stuck with this.
P.S: You may refer to the image and mph files shared earlier in this conversation thread.
Thanks,
Ashish
Dear Magnus,
Thanks for writing back to me.
However, my issue is little different. In the 'variables' section you should find an variable called 'A'
where, A=(exp(-5.724e-10*an2(s)) - 1.0)*(0.5/(0.00025*an2(s) + 1.0) - 0.5/(0.00025*an1(t) + 1.0))^2*(1.891e+5*an1(t) - 3.782e+8*(2.0/(0.00025*an1(t) + 1.0) + (0.00025*an1(t) + 1.0)^2)*(0.00025*an1(t) + 1.0)*(8.333e-5*an1(t) + 0.3333) + 7.564e+8) + (exp(-5.724e-10*an2(s)) - 1.0)*(0.5/(0.00025*an2(s) + 1.0) - 0.5/(0.00025*an1(t) + 1.0))^2*(1.891e+5*an1(t) - 3.782e+8*(2.0/(0.00025*an1(t) + 1.0) + (0.00025*an1(t) + 1.0)^2)*((0.00025*an1(t) + 1.0)^2 + (0.00025*an1(t) + 1.0)*(8.333e-5*an1(t) + 0.3333)) + 7.564e+8) + (exp(-5.724e-10*an2(s)) - 1.0)*(0.5/(0.00025*an2(s) + 1.0) - 0.5/(0.00025*an1(t) + 1.0))*(0.5*(0.00025*an2(s) + 1.0)^2 - 0.5*(0.00025*an1(t) + 1.0)^2)*(94550.0*an1(t) + 6.051e+15/(an1(t) + 4000.0)^2 - (2.017e+15*(2.0/(0.00025*an1(t) + 1.0) + (0.00025*an1(t) + 1.0)^2)*(0.00025*an1(t) + 1.0))/(an1(t) + 4000.0)^2 + 3.782e+8)
where 't' varies from 0 to 1000 seconds( 1000 seconds is the total simulation time period). The time step (lets say dt) is 1 second.
's' on the other hand is a smaller time step which varies within the confinements of each time step. In other words,
when t=1 second , s varies from 0 to 1.
when t=2 second , s varies from 1 to 2.
when t=3 second , s varies from 2 to 3.
..
.
.
.
when t=800 second , s varies from 799 to 800.
..
.
.
when t=1000 second , s varies from 999 to 1000.
To acheive this i used two analytic functions "an1(t)" and "an2(s)" . But the expression for A(shown above) shows orange . This is because 'an2(s)' is not recognised. ( I am pretty sure an1(t) only seems to be recognised as perhaps Comsol perceives it to be time , which is right by the way).
Please help me with this, coz as i said earlier i am terribly stuck with this.
P.S: You may refer to the image and mph files shared earlier in this conversation thread.
Thanks,
Ashish
Magnus Ringh
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
10 months ago
Jan 8, 2024, 2:49 a.m. EST
Hi Ashish,
It is not clear to me what you want to achieve here. The only time variable that the COMSOL Multiphysics software recongnizes is t
, and the time steps for a transient simulation are determined by the solver (but there are many settings that you can use to control the time stepping). The output times (the times for which a solution is computed and stored for further processing) are specified by the user in the Time Dependent (or similar) study step. If you have further questions, I recommend that you contact COMSOL Support: https://www.comsol.com/support/case/.
Best regards,
Magnus
Hi Ashish,
It is not clear to me what you want to achieve here. The only time variable that the COMSOL Multiphysics software recongnizes is `t`, and the time steps for a transient simulation are determined by the solver (but there are many settings that you can use to control the time stepping). The output times (the times for which a solution is computed and stored for further processing) are specified by the user in the **Time Dependent** (or similar) study step. If you have further questions, I recommend that you contact COMSOL Support: .
Best regards,
Magnus