getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Centrifugal force


From: SIMON AMEYE
Subject: Re: [Getfem-users] Centrifugal force
Date: Thu, 1 Feb 2018 17:39:26 +0000

Here it is !

Thank you very much Andriy ! It is so fast now!

 

F = Rho * W^2 * Distance_with_center.*Projection_On_[x or y]

FX = get(mfd, 'eval', {[num2str(Rho),'.*',num2str(Rotat_Speed),'.^2.*(x.^2+y.^2).^0.5  .*x./((x.^2+y.^2).^0.5)']});

FY = get(mfd, 'eval', {[num2str(Rho),'.*',num2str(Rotat_Speed),'.^2.*(x.^2+y.^2).^0.5  .*y./((x.^2+y.^2).^0.5)']});

gf_model_set(md, 'add initialized fem data', 'VolumicData', mfd, [FX;FY]);

gf_model_set(md, 'add source term brick', mim, 'u', ['VolumicData']);

 

Have a nice day,

 

Simon

 

De : Andriy Andreykiv [mailto:address@hidden
Envoyé : jeudi 1 février 2018 17:29
À : SIMON AMEYE - U510180 <address@hidden>
Objet : Re: [Getfem-users] Centrifugal force

 

>>> Real sender address / Reelle adresse d expedition : address@hidden <<<


Dear Simon,

 

OK, I understand you cannot use axisymmetry. Yes, you can assign any source term in one step. Source term

brick doesn't assign force, it assigns traction or volume specific force, hence you don't need to calculate the area/volume of the element, as the _expression_

you are going to calculate is going to be integrated over the  the element (hence, multiplied by the volume/area already).

So, you don't set the _expression_ on the nodes, it will be integrated and subsequently assembled into the nodes.

One way I think you can assign centrifugal body force is by setting the source term _expression_ simply as "constant * X". High level assembly

treats "X" as a vector of coordinates. So,   "constant * X" gives you a force with magnitude "R * constant" directed away from (0, 0).

 

I hope this helps,

                               Andriy

 

On 1 February 2018 at 10:49, SIMON AMEYE <address@hidden> wrote:

Dear Andriy,

 

Thank you for your quick answer,

Unfortunately, my mesh is not axisymmetric. I need to take into account the 2D shape of my mesh.

My question was about the ways of applying centrifugal force on it.

But here may be one solution : I just noticed that if I use the standard source term brick I can apply all the forces I previously calculated on the nodes in only one step!

But I don’t understand why the applied force resulting is so low.

 

gf_model_set(md, 'add initialized fem data', 'VolumicData', mfd,[Fx_On_nodes,Rotor.Fy_On_nodes]  );

gf_model_set(md, 'add source term brick', mim, 'u', ['VolumicData']);

 

Do you have any idea ? Or another way to do so ?

 

Thank you again for your help,

 

Simon

 

 

De : Andriy Andreykiv [mailto:address@hidden]
Envoyé : jeudi 1 février 2018 16:34
À : SIMON AMEYE - U510180 <
address@hidden>
Cc :
address@hidden; address@hidden
Objet : Re: [Getfem-users] Centrifugal force

 

>>> Real sender address / Reelle adresse d expedition : address@hidden <<<


Dear Simon,

 

I think one way to greatly speed up your program is to take into account the axi-symmetry of your problem.

Getfem fully supports it. That would mean that you can reduce your 2D problem to 1D.

You can create a simple line mesh, but using a type torus_mesh and subsequently create torus_mesh_fem on it.

Then you need to apply your force on a single edge/point of your mesh.

 

Best regards,

                        Andriy

 

On 1 February 2018 at 08:35, SIMON AMEYE <address@hidden> wrote:

Hi all,

 

I am asking for help again about my computation, that now works fine thanks to you, but slowly.

My 2D mesh represents a part that is spinning around a point (0,0).

To considerate the centrifugal force, I now calculate the area of each element, and apply a force using “source term brick” on its boundaries.

The problem is that add 2000 sources terms for 2000 elements is slow.

Do you have any idea of which brick I need to use to set the force in one step ?

The centrifugal force is described this way : “ F=constant*R “ where R is the distance between the rotation point and the element.

 

To get an idea about my actual code, here it is :

 

 

Setting all the regions by locating the faces

for i = 1:NumberOfElements

ftri_rand = get(rot_mesh,'faces from cvid',(i+1));

rot_mesh.set_region(i, ftri_rand);

end

 

Applying a force on each region

for i = 1: NumberOfElements

gf_model_set(md, 'add initialized data', ['VolumicData' num2str(i)], [Fx_tri(i), Fy_tri(i)]./Perimeter(i));

gf_model_set(md, 'add source term brick', mim, 'u', ['VolumicData' num2str(i)], i);

end

 

Thank you again for your help,

 

Simon Ameye

 

 

cid:image001.png@01D193D3.0D03A420

 

SIMON AMEYE

DQI/DRIA/DSTF/SEPC

Apprenti IFP School


CENTRE TECHNIQUE VELIZY A /

 

 

 

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]