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 <[email protected]> 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
>
>
>
>
>
> [image: cid:[email protected]]
>
>
>
> *SIMON AMEYE*
>
> DQI/DRIA/DSTF/SEPC
>
> Apprenti IFP School
> ------------------------------
>
> CENTRE TECHNIQUE VELIZY A /
>
>
>
>
>
>
>