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.

change of center of mass

Please login with a confirmed email address before reporting spam

Dear All,

I am using structural mechanics module to model the deformation of a solid assembly under external (magnetic) force.

The force is known. It is modeled as a body load. Later, deformation is caluclated.

Can someone please tell me how to locate the new (and old, before deformation) center of mass?

Thanks!

Arda

8 Replies Last Post Jan 13, 2012, 11:44 a.m. EST
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 Jan 22, 2011, 10:06 a.m. EST
Hi

you write out the formula for the centre of gravity starting wit the element dx*dy*dz:

Xcog = intop1(sold.rho*x)/intop(solid.rho)
Ycog = intop1(sold.rho*y)/intop(solid.rho)
Zcog = intop1(sold.rho*z)/intop(solid.rho)

in 3.5 iths with the integration coupling variables that replaces "intop1()" and you replace "solid.rho" by "rho_smsld"

But you have also somewhere in 3.5 the geoemtric properties tat gives you the CoG and inertias if you introduce rho_smsld instead of the constant "1" (this is not yet implemeneted in v4.1, sadly)

Then the question what is the deformed and undeformed items. Here it differs between 3.5a nd v4, as by default in 3.5 the reference frame is off in structural (but you could turn it on under physics properties).

In v4.1 the deformed Spatial Frame x=X+u (where X is the Material frame) indicates that you replace the lower case x,y,z by the upper case X,Y,Z to go from the deformed to fixed geometry

in 3.5 you can also just replace x by "x+u"

Pls check with a simple example (simple square in 2D that is highly deformed) and check your understanding of the different "frames" and the lower/upper case notation x-X, and recheck with the doc) As often I might have mixed things and I'm writing from memory (3.5 stuff is getting old).

Something too, the x and X changes when you turn on/off the option of deformed frame on/off in v4. Be sure you catch the correct logic

--
Good luck
Ivar
Hi you write out the formula for the centre of gravity starting wit the element dx*dy*dz: Xcog = intop1(sold.rho*x)/intop(solid.rho) Ycog = intop1(sold.rho*y)/intop(solid.rho) Zcog = intop1(sold.rho*z)/intop(solid.rho) in 3.5 iths with the integration coupling variables that replaces "intop1()" and you replace "solid.rho" by "rho_smsld" But you have also somewhere in 3.5 the geoemtric properties tat gives you the CoG and inertias if you introduce rho_smsld instead of the constant "1" (this is not yet implemeneted in v4.1, sadly) Then the question what is the deformed and undeformed items. Here it differs between 3.5a nd v4, as by default in 3.5 the reference frame is off in structural (but you could turn it on under physics properties). In v4.1 the deformed Spatial Frame x=X+u (where X is the Material frame) indicates that you replace the lower case x,y,z by the upper case X,Y,Z to go from the deformed to fixed geometry in 3.5 you can also just replace x by "x+u" Pls check with a simple example (simple square in 2D that is highly deformed) and check your understanding of the different "frames" and the lower/upper case notation x-X, and recheck with the doc) As often I might have mixed things and I'm writing from memory (3.5 stuff is getting old). Something too, the x and X changes when you turn on/off the option of deformed frame on/off in v4. Be sure you catch the correct logic -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 12, 2012, 9:28 a.m. EST
Hello Ivar, hello Forum,

I have a similar problem (Comsol 4.2a). I simulate the phase change (fluid/solid) and as a result I get a volume of fluid surrounded by the solid.

In the post processing I want to evaluate the motion of the center of gravity over time for the fluid phase. CoG and phase state respectively are a function of the temperature called T. T_trans is the phase change temperature defined as a constant. What I need (as far as I understand) is the modification of the formula below w/ the constraint T>=T_trans.

Something like
Xcog = intop1(nitf.rho*x)/intop(nitf.rho)
in the varables block works in my model.

Up to now I produced a lot of errors trying to adapt this function, I guess my syntax was always wrong. Can you give me an idea how I have to modify it?


Best regards.
Ralf.


Hi

you write out the formula for the centre of gravity starting wit the element dx*dy*dz:

Xcog = intop1(sold.rho*x)/intop(solid.rho)
Ycog = intop1(sold.rho*y)/intop(solid.rho)
Zcog = intop1(sold.rho*z)/intop(solid.rho)

in 3.5 iths with the integration coupling variables that replaces "intop1()" and you replace "solid.rho" by "rho_smsld"

But you have also somewhere in 3.5 the geoemtric properties tat gives you the CoG and inertias if you introduce rho_smsld instead of the constant "1" (this is not yet implemeneted in v4.1, sadly)

Then the question what is the deformed and undeformed items. Here it differs between 3.5a nd v4, as by default in 3.5 the reference frame is off in structural (but you could turn it on under physics properties).

In v4.1 the deformed Spatial Frame x=X+u (where X is the Material frame) indicates that you replace the lower case x,y,z by the upper case X,Y,Z to go from the deformed to fixed geometry

in 3.5 you can also just replace x by "x+u"

Pls check with a simple example (simple square in 2D that is highly deformed) and check your understanding of the different "frames" and the lower/upper case notation x-X, and recheck with the doc) As often I might have mixed things and I'm writing from memory (3.5 stuff is getting old).

Something too, the x and X changes when you turn on/off the option of deformed frame on/off in v4. Be sure you catch the correct logic

--
Good luck
Ivar


Hello Ivar, hello Forum, I have a similar problem (Comsol 4.2a). I simulate the phase change (fluid/solid) and as a result I get a volume of fluid surrounded by the solid. In the post processing I want to evaluate the motion of the center of gravity over time for the fluid phase. CoG and phase state respectively are a function of the temperature called T. T_trans is the phase change temperature defined as a constant. What I need (as far as I understand) is the modification of the formula below w/ the constraint T>=T_trans. Something like Xcog = intop1(nitf.rho*x)/intop(nitf.rho) in the varables block works in my model. Up to now I produced a lot of errors trying to adapt this function, I guess my syntax was always wrong. Can you give me an idea how I have to modify it? Best regards. Ralf. [QUOTE] Hi you write out the formula for the centre of gravity starting wit the element dx*dy*dz: Xcog = intop1(sold.rho*x)/intop(solid.rho) Ycog = intop1(sold.rho*y)/intop(solid.rho) Zcog = intop1(sold.rho*z)/intop(solid.rho) in 3.5 iths with the integration coupling variables that replaces "intop1()" and you replace "solid.rho" by "rho_smsld" But you have also somewhere in 3.5 the geoemtric properties tat gives you the CoG and inertias if you introduce rho_smsld instead of the constant "1" (this is not yet implemeneted in v4.1, sadly) Then the question what is the deformed and undeformed items. Here it differs between 3.5a nd v4, as by default in 3.5 the reference frame is off in structural (but you could turn it on under physics properties). In v4.1 the deformed Spatial Frame x=X+u (where X is the Material frame) indicates that you replace the lower case x,y,z by the upper case X,Y,Z to go from the deformed to fixed geometry in 3.5 you can also just replace x by "x+u" Pls check with a simple example (simple square in 2D that is highly deformed) and check your understanding of the different "frames" and the lower/upper case notation x-X, and recheck with the doc) As often I might have mixed things and I'm writing from memory (3.5 stuff is getting old). Something too, the x and X changes when you turn on/off the option of deformed frame on/off in v4. Be sure you catch the correct logic -- Good luck Ivar [/QUOTE]

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 Jan 12, 2012, 3:21 p.m. EST
Hi

have your tried something like:

Xcog = intop1(nitf.rho*x*(T>=T_trans)) / intop1(nitf.rho*(T>=T_trans))
etc.

I believe it's different from aveop1(nitf.rho*x*(T>=T_trans)), intersting to check and to understand why ;)

in v4 notation, but aveop1 does not exist as pre-cooked operator in 3.5

this assumes that nitf.rho is a function of at least one of x,y,z,T, otherwise you should be able to ignore it, and that is "just" the formula of a weighted average, based on rho and on the presence of fluid or not

Now you should also check in which frame you integrate (fixed or deformed one), but that depends also on the physics you are using


--
Good luck
Ivar
Hi have your tried something like: Xcog = intop1(nitf.rho*x*(T>=T_trans)) / intop1(nitf.rho*(T>=T_trans)) etc. I believe it's different from aveop1(nitf.rho*x*(T>=T_trans)), intersting to check and to understand why ;) in v4 notation, but aveop1 does not exist as pre-cooked operator in 3.5 this assumes that nitf.rho is a function of at least one of x,y,z,T, otherwise you should be able to ignore it, and that is "just" the formula of a weighted average, based on rho and on the presence of fluid or not Now you should also check in which frame you integrate (fixed or deformed one), but that depends also on the physics you are using -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 12, 2012, 5:17 p.m. EST

Hi,

you can try with these formulas:

Xcog = intop1((nitf.rho*(T>=T_trans))*(x*(T>=T_trans)))/intop1(nitf.rho*(T>=T_trans))
Ycog = intop1((nitf.rho*(T>=T_trans))*(y*(T>=T_trans)))/intop1(nitf.rho*(T>=T_trans))
Zcog = intop1((nitf.rho*(T>=T_trans))*(z*(T>=T_trans)))/intop1(nitf.rho*(T>=T_trans))

I used this formula in 2D-modell, and it was successful ;-)

--
------------------------------
Best regards
QTran
Hi, you can try with these formulas: Xcog = intop1((nitf.rho*(T>=T_trans))*(x*(T>=T_trans)))/intop1(nitf.rho*(T>=T_trans)) Ycog = intop1((nitf.rho*(T>=T_trans))*(y*(T>=T_trans)))/intop1(nitf.rho*(T>=T_trans)) Zcog = intop1((nitf.rho*(T>=T_trans))*(z*(T>=T_trans)))/intop1(nitf.rho*(T>=T_trans)) I used this formula in 2D-modell, and it was successful ;-) -- ------------------------------ Best regards QTran

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 Jan 13, 2012, 2:31 a.m. EST
Hi

Yes indeed, but the doubling of the Boolean expression is not required, it's either 0 or 1 so 0^2 or 1^2 just looses time ;)

--
Good luck
Ivar
Hi Yes indeed, but the doubling of the Boolean expression is not required, it's either 0 or 1 so 0^2 or 1^2 just looses time ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 13, 2012, 4:16 a.m. EST

Hi Ivar,

you are right, i tried with your formulas and the results are not different.

Thanks so much.


--
------------------------------
Best regards
QTran
Hi Ivar, you are right, i tried with your formulas and the results are not different. Thanks so much. -- ------------------------------ Best regards QTran

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 13, 2012, 5:45 a.m. EST
Hello Ivar and Tuyen,

well I tried "something like" your suggestion. As I assumed in my version of the function I implemented a syntax error, the "*" between xyz and the boolean operator was missing. Therefore xyz was defined as a function of T, that's not correct.

Now it works as it should. Thanks to you both!

I have another question concerning the 3D-visualisation of the CoG.
I would like to point with an arrow/vector (e.g. basis at (0,0,0), end at (x_G,y_G, z_G).
I tried to modifiy "arrow surface"-function in that way but I got only a vector w/ the correct direction.

I see no way to scale its' length in the mentioned way (e.g. functions seem to be not allowed in the scale factor field).

Have a good day!

Ralf.
Hello Ivar and Tuyen, well I tried "something like" your suggestion. As I assumed in my version of the function I implemented a syntax error, the "*" between xyz and the boolean operator was missing. Therefore xyz was defined as a function of T, that's not correct. Now it works as it should. Thanks to you both! I have another question concerning the 3D-visualisation of the CoG. I would like to point with an arrow/vector (e.g. basis at (0,0,0), end at (x_G,y_G, z_G). I tried to modifiy "arrow surface"-function in that way but I got only a vector w/ the correct direction. I see no way to scale its' length in the mentioned way (e.g. functions seem to be not allowed in the scale factor field). Have a good day! Ralf.

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 Jan 13, 2012, 11:44 a.m. EST
Hi

Unfortnately COMSOl has still not understood the interest of use of CoG, Inertia etc, easily and quickly accessible as it was for 3.5.

But I still hope it will arrive once ;)

for the time being I calculate all manually, quite some typing, and systematically for all my structural models, as this is required to check that the FEM model is more or less compatible with my CAD models (correct material choices etc).

Perhaps what you could do is to define a coordinate system based on your CoG coordinate values (so long you do not refer to the coordinate system inside you solving process, COMSOL might accept it), and calculate the true position only at posprocessing. Then you should be able to tweak the coordinate plot to put a frame at your CoG. It's a guess, today I'm not in my office by my COMSOL WS ;)

--
Good luck
Ivar
Hi Unfortnately COMSOl has still not understood the interest of use of CoG, Inertia etc, easily and quickly accessible as it was for 3.5. But I still hope it will arrive once ;) for the time being I calculate all manually, quite some typing, and systematically for all my structural models, as this is required to check that the FEM model is more or less compatible with my CAD models (correct material choices etc). Perhaps what you could do is to define a coordinate system based on your CoG coordinate values (so long you do not refer to the coordinate system inside you solving process, COMSOL might accept it), and calculate the true position only at posprocessing. Then you should be able to tweak the coordinate plot to put a frame at your CoG. It's a guess, today I'm not in my office by my COMSOL WS ;) -- 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.