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.

Issues with Full Coupling of Physics

Please login with a confirmed email address before reporting spam

Good day,

I am having issues with fully coupling two physics.

My system contains the solid mechanics physics coupled with a general form PDE to model concentration change and the diffusive properties of a spherical particle.

the solid mechanics stress results depend on the concentration results (solved for by the general form PDE) and the concentration results depend on the stress results.

Before solving anything I am defining my stresses ( that will be solved in the solid mechanics physics) as
sigx = solid.sx
sigy = solid.sy
sigz = solid.sz

so that I can write my PDE that involves these stresses.

My question is: Am I naming these variable wrong in regards to suitable convention? I ask because it does not allow me to run my problem as it is saying that the variables cannot be determined.

11 Replies Last Post 11 apr 2013, 08:12 GMT-4
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 7 apr 2013, 04:26 GMT-4
Hi

what kind of error message do you have exactly ?

You know that these "variables" are in fact fields "solid.sx(x,y,z,t)", so have you set up your variable definition accordingly with respect to a domain ?



--
Good luck
Ivar
Hi what kind of error message do you have exactly ? You know that these "variables" are in fact fields "solid.sx(x,y,z,t)", so have you set up your variable definition accordingly with respect to a domain ? -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 apr 2013, 23:51 GMT-4
My solid physics (solid) has thermal expansion in which I need the temperature profile to be a function of concentration c. [i.e T=f(mod1.g.c)]
My PDE (g), where (L(c) = dc/dt - grad dot GAMMA = 0), is a function of c and stress tensors in x, y and z direction; [i.e. L(c)=f(c, mod1.solid.sx, mod1.solid.sy, mod1.solid.sz)]

both physics are well-posed with proper initial conditions and boundary conditions that do not depend on any of the dependent variables.

I am attempting to couples these two physics through the use of thee following globally defined variables

sig1=mod1.solid.sx
sig2=mod1.solid.sy
sig3=mod1.solid.sz
sigh=(sig1+sig2+sig3)/3
conc=mod1.g.c

but the error message I am getting is ridiculously long so I am sure there is a major problem with my implementation.

Can you please advice on how I could effectively fully couple two systems whose solutions depend on one another.

I have attached the .mph file so that you can generate the error file if possible as it is too long to put in this thread.
My solid physics (solid) has thermal expansion in which I need the temperature profile to be a function of concentration c. [i.e T=f(mod1.g.c)] My PDE (g), where (L(c) = dc/dt - grad dot GAMMA = 0), is a function of c and stress tensors in x, y and z direction; [i.e. L(c)=f(c, mod1.solid.sx, mod1.solid.sy, mod1.solid.sz)] both physics are well-posed with proper initial conditions and boundary conditions that do not depend on any of the dependent variables. I am attempting to couples these two physics through the use of thee following globally defined variables sig1=mod1.solid.sx sig2=mod1.solid.sy sig3=mod1.solid.sz sigh=(sig1+sig2+sig3)/3 conc=mod1.g.c but the error message I am getting is ridiculously long so I am sure there is a major problem with my implementation. Can you please advice on how I could effectively fully couple two systems whose solutions depend on one another. I have attached the .mph file so that you can generate the error file if possible as it is too long to put in this thread.


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 apr 2013, 14:55 GMT-4
Hi

I'm not by my WS so I cannot open your model, but what puzzles me from you explanation is that you call them "global" equations, for me these are "local", since" mod1.solid.sx" hence also sig1 are fields depending on (x,y,z,t) and defined on some Domain or more probable a Boundry. THey cannot be use globally as they need a link to the coordiantes to take any particular value.

You can define a specific variable node, under model defnition, get it to apply only to some special boundaries and there you can write your variables (defined then as general fields over the selected entities), then for any BC applying to these netities (or part of those) you can access your fileds, with the implicit reference to (x,y,z,t) as governed by the boundary

This is often misunderstood, but you might know it well, and then it's something else ;)

--
Good luck
Ivar
Hi I'm not by my WS so I cannot open your model, but what puzzles me from you explanation is that you call them "global" equations, for me these are "local", since" mod1.solid.sx" hence also sig1 are fields depending on (x,y,z,t) and defined on some Domain or more probable a Boundry. THey cannot be use globally as they need a link to the coordiantes to take any particular value. You can define a specific variable node, under model defnition, get it to apply only to some special boundaries and there you can write your variables (defined then as general fields over the selected entities), then for any BC applying to these netities (or part of those) you can access your fileds, with the implicit reference to (x,y,z,t) as governed by the boundary This is often misunderstood, but you might know it well, and then it's something else ;) -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 apr 2013, 05:05 GMT-4
Hi,

Yes, all these variables are defined in the 3D domain and can vary in space and time. You should therefore define them in a Variables node under Model 1>Definitions, and define them in the Domain. The variable conc is defined using a dependent variable, which you access here simply as "c" (not "mod1.g.c"). Also, the stress variables can be defined using only "solid.sx" etc. Regarding the error in the model, you can see that COMSOL does not recognize "mod1.g.c" in the Variables node's settings window (it's orange and the tooltip displays "Unknown variable mod1.g.c").

Best regards,
Magnus Ringh, COMSOL
Hi, Yes, all these variables are defined in the 3D domain and can vary in space and time. You should therefore define them in a Variables node under Model 1>Definitions, and define them in the Domain. The variable conc is defined using a dependent variable, which you access here simply as "c" (not "mod1.g.c"). Also, the stress variables can be defined using only "solid.sx" etc. Regarding the error in the model, you can see that COMSOL does not recognize "mod1.g.c" in the Variables node's settings window (it's orange and the tooltip displays "Unknown variable mod1.g.c"). Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 apr 2013, 12:10 GMT-4
Thank you Ivar and Magnus,

It was a quick fix and I realize completely and understand completely what you are referring to.

I am in the process of running a time dependent study and was wondering if there was a way to impose some conditional statement so that my study can stop at a desired value of one of my dependent variables instead of me wasting time computing for values at times that will be redundant and nonsensical for me.

Can you please advice?

Thank you.

Philip
Thank you Ivar and Magnus, It was a quick fix and I realize completely and understand completely what you are referring to. I am in the process of running a time dependent study and was wondering if there was a way to impose some conditional statement so that my study can stop at a desired value of one of my dependent variables instead of me wasting time computing for values at times that will be redundant and nonsensical for me. Can you please advice? Thank you. Philip

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 10 apr 2013, 12:47 GMT-4
Hi

ceck the "stop conditions" in the solver nodes (check the doc and or help) there are many buttons one can tweak within COMSOL ;)

--
Good luck
Ivar
Hi ceck the "stop conditions" in the solver nodes (check the doc and or help) there are many buttons one can tweak within COMSOL ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 apr 2013, 14:33 GMT-4
Thank you once again Ivar,

apparently my issues are quick fixes that I think will become fewer in numbers once I become more familiar with COMSOL.
Thank you once again Ivar, apparently my issues are quick fixes that I think will become fewer in numbers once I become more familiar with COMSOL.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 apr 2013, 20:16 GMT-4
Good day,

while using the "stop condition" node I am getting an error that is telling me that I have an undefined function/operator that I previously defined in the model definition as:

maxop1

which I apply to my boundary.

I am running my time dependent study and my stop condition is that once my concentration c (dependent variable) reaches a maximum concentration cmax (known constant) the study will stop and I implemented this as such in the expression:

cmax-maxop1(c)

which should stop the study when this is negative yet I can not get it to work.

Good day, while using the "stop condition" node I am getting an error that is telling me that I have an undefined function/operator that I previously defined in the model definition as: maxop1 which I apply to my boundary. I am running my time dependent study and my stop condition is that once my concentration c (dependent variable) reaches a maximum concentration cmax (known constant) the study will stop and I implemented this as such in the expression: cmax-maxop1(c) which should stop the study when this is negative yet I can not get it to work.

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 11 apr 2013, 01:25 GMT-4
Hi

are you using latest version with latest patch (.161) for me ?
As I see others noticed some differences, but that was not on the stop condition, specifically.
The maxop() is an expensive operator (many if's), often its simpler to use an average operator over a domain. but then you need to know where you max will appear, about and the max value, or thereabout

Another way is to drive your BC providing the C via an independent variable controlled by a constant concetration in a given region, but then you are into control thory

--
Good luck
Ivar
Hi are you using latest version with latest patch (.161) for me ? As I see others noticed some differences, but that was not on the stop condition, specifically. The maxop() is an expensive operator (many if's), often its simpler to use an average operator over a domain. but then you need to know where you max will appear, about and the max value, or thereabout Another way is to drive your BC providing the C via an independent variable controlled by a constant concetration in a given region, but then you are into control thory -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 11 apr 2013, 05:01 GMT-4
Good day,

Instead of using the maximum operator maxop1, I used the average operator aveop1 as I know the location of the maximum concentration (cmax) which is a constant and the location of this max (the boundary of a spherical particle).

The average operator was defined under my model definition and I then used it in the stop condition node with the expression:

cmax-aveop1(c)

When I run the time study with this stop condition I get this error:

(
The following feature has encountered a problem:

Unknown function or operator.
-Name: aveop1
-Feature: Time-Dependent Solver 1 (sol1/t1)
-Error: Unknown function or operator.
)

Am I defining the stop condition expression wrong? I know the operator itself works as I solved the problem over a period of time and plot (aveop1,t) and saw that the value matched that of the boundary concentration value.
Good day, Instead of using the maximum operator maxop1, I used the average operator aveop1 as I know the location of the maximum concentration (cmax) which is a constant and the location of this max (the boundary of a spherical particle). The average operator was defined under my model definition and I then used it in the stop condition node with the expression: cmax-aveop1(c) When I run the time study with this stop condition I get this error: ( The following feature has encountered a problem: Unknown function or operator. -Name: aveop1 -Feature: Time-Dependent Solver 1 (sol1/t1) -Error: Unknown function or operator. ) Am I defining the stop condition expression wrong? I know the operator itself works as I solved the problem over a period of time and plot (aveop1,t) and saw that the value matched that of the boundary concentration value.

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 11 apr 2013, 08:12 GMT-4
Hi

if aveop1() is correctly defined over a boundary or domain, that should work !?

You should ask "support" if nobody else can help you

--
Good luck
Ivar
Hi if aveop1() is correctly defined over a boundary or domain, that should work !? You should ask "support" if nobody else can help you -- 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.