Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
Curve area as input parameter at every time point
Posted 21 gen 2011, 17:22 GMT-5 Low-Frequency Electromagnetics, Materials, Parameters, Variables, & Functions, Studies & Solvers Version 4.2a 7 Replies
Please login with a confirmed email address before reporting spam
I was wondering, is there a way to declare a variable (say v1) that is the integration of another variable(v2) over a certain domain. This would mean that v1 will change during each time step as a result of the integral changing. i appreciate any input from you folks. Thanks
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
how do you define "intop" and where?
I would also need integrate over a variable to get another one.
I hope you could help me.
thanks in advance,
best regards,
Isa
Please login with a confirmed email address before reporting spam
I believ you are confused about the local variables and the "global variables". Most local variables are fields they depend on the coordinates, time etc, hence depends on which entity you consider (domain, boundary, edge or point) while a global variable is mostly independt from the coordinates.
So defining a global varable gv = intop1(lv) means that the intop1() (integration operator) is applyig an integration of the local variable such as gv(t)=int_over_selected_entities_of(local_variable(x,y,z,t)*dx*dy*dz (hope you follow my notation ;) The inteop1() is defined uner Definition Coupling variable
the dependence on "t" is optional and might not be relevant for you (except if you run a time solver)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I am afraid I don't understand you very well.
I am using COMSOL 4.2a with the AC/DC module. The problem I want to simulate is Magnetic Field (mf).
If I calculate the variable "mf.Jiphi" and I want to calculate the integration of this variable I do:
Model 1 (mod1) -> Variables 2a and, there, I define "Intplasma=intop1(mf.Jiphi)"
Later, in external Current Density in the domain I want to put a value I would do:
Je=Intplasma/(area of domain);
The study I am using is a time dependent solver but when I want to run the problem, I obtain the following error:
Failed to evaluate variable Jacobian.
- Variable: mod1.Intplasma
- Geometry: 1
- Domain: 5
I don't know what I am doing wronlgy and I would be really grateful if you could help me.
Best,
Isa
Please login with a confirmed email address before reporting spam
it's not necessarily wrong ;)
As you define and impose a constant external current Je being the average of another current from the model, and probably use it in the solver process, COMSOL is trying to get its derivative (Jacobian) for the solver process, but COMSOL does not manage to get a derivative from the integration operation.
You could try a Intplasma=nojac(intop1(mf.Jiphi)) but I not at all sure it will do the job, it gives a hint that your function does not have a derivative.
now I need to know more about your model to goany further, even if i'm not sure I can fully answer your case, but perhaps other out there ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I have tried to use Intplasma=nojac(intop1(mf.Jiphi)), but I obtain the same problem.
Here I attach the file .mph in order you could know more about my model to go further.
thanks in advance,
best regards,
Isa
Attachments:
Please login with a confirmed email address before reporting spam
Well you have several issues I see in your model
best is to set up some model variables, or global variables for values you need to calculate (i.e. all "red" parameters) Parameters are static and loaded once at solver start, here several of them are related to values that change during the simulation, so they should NOT be in the parameter definitions
you have a static and a time dfependent solver sequence, but during static solver the time "t" is not defined, it is worth to set a Parameter t=0[s] in the parameter list as you need "t" to solve some of your (to be) variables
Then the External current Jp is not defined on any domain I suspect ist is supposed to apply to "4" or ?
the remove the nojac(), as I suspect there are other reasons for your error.
General remark:
red = formula error, must be re-solved, before solving !
orange = unit issue warning, might not be critical, personally I always try to resolve them, as often its also linked to a typo or a unit conversion error from my side
--
Good luck
Ivar
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.
Suggested Content
- BLOG How to Perform a Sensitivity Analysis in COMSOL Multiphysics®
- KNOWLEDGE BASE How does COMSOL Multiphysics handle complex-valued numbers and problems in the frequency domain?
- KNOWLEDGE BASE Computing Time and Space Integrals
- KNOWLEDGE BASE Solving Wave-Type Problems with Step Changes in the Loads
- FORUM how to input a point mass at the center of the surface