I need to solve an equation like: a = b(at time=0.2s)*exp(-t)
that is i need value of a variable (b in this case) at some time during computation and then calculate rest of the solution based on that value. So how to do it in COMSOL?
Split the task into two. Make two transient studies. from t=0 to t=a (the time that you are interested in the value of b as you mentioned), and from t=a to t=final, and run the first one.Then, run the second study, however, under the study tab, you should define that get the initial values from previous study.
The other way, is that you put the value of intended manually by yourself.
Second, i tried your second suggestion but i got next problem. Let me explain what i'm doing:
I'm defining a simple filed-variable as var=x*y and then plotting it (2D surface plot). After plotting, i'm exporting the plot into CSV file. Then i'm importing this data via interpolation function (your 2nd suggestion). Now if i plot this data (which is exactly same), it's giving me something else. Neither same appearance in surface plot nor same color values. (BUT Its giving me same 3D plot via plot-button in interpolation function, but not in 2D surface plot after computation)
Kindly help me out again, i don't know whats going on.
Yeah, sure! Here it is with a little explanation. (COMSOL version: 5.0)
A Domain-ODE is needed to solve for variable Np. Np depends on a field variable Vm (Vm = a * (ec.normE/maximumOf(ec.normE)) where a can be any number b/w 0.5 to 3)
Then the value of Np at time=0.1s is needed as the initial value or peak value to find Ap for time=0.1 to 5s (where Ap=pi*Rp*Rp*Np*(t==0.1)*exp(-t). My this expression is not working either in 5 second simulation.)
Then we need to find reaction rate R which will be used by Transport of Dilute Specie (tds) module.
And thanks for your this much help. Thanks a lot :-)