Welcome to the forums. Please post in English or French.

You are not logged in.

## #1 2012-03-23 23:20:05

Theobalt
Member
Registered: 2009-03-11
Posts: 119

### Easy question: how to set a force on a surface?

Hi!

From what I understand FORCE_FACE requires a force per unit area. Is there a way to say to Code_aster to set a let's say 1000N force on such or such area, or do I have to manually compute the area of the given surface, compute the resulting force per unit area and then enter that value at the FORCE_FACE keyword?

In short, with Abaqus, Cosmos, and others, we simply indicate for example: "put 1000N on the surface A." Is there an equivalent with Code_Aster?

Thanks!

Offline

## #2 2012-03-24 14:53:01

Johannes_ACKVA
Member
From: Ingenieurbüro für Mechanik, DE
Registered: 2009-11-04
Posts: 664
Website

### Re: Easy question: how to set a force on a surface?

Theobald,
there is no "put 1000N on the surface A."  in Code-Aster. But it is not necessary to compute You surface manually. You can insert the POST_ELEM command in order to get and then print the surface area of the whole mesh or of a group of elements. Example:

MeshLin=LIRE_MAILLAGE();

dkt=AFFE_MODELE(MAILLAGE=MeshLin,
VERIF='MAILLE',
AFFE=_F(TOUT='OUI',
PHENOMENE='MECANIQUE',
MODELISATION='DKT',),);

elastic=DEFI_MATERIAU(ELAS=_F(E=200000.0, RHO=1, NU=0.0,),);

Mat=AFFE_MATERIAU(MAILLAGE=MeshLin, AFFE=_F(TOUT='OUI', MATER=elastic,),);

Cara=AFFE_CARA_ELEM(MODELE=dkt,
COQUE=_F(GROUP_MA='PLATE_T1',EPAIS=1.0,),);

tab_post=POST_ELEM(MASS_INER=_F(GROUP_MA='PLATE_T1'),
MODELE=dkt,
CHAM_MATER=Mat,
CARA_ELEM=Cara,
TITRE='tit_von_post_elem',);
IMPR_TABLE(TABLE=tab_post,);

After read the surface area You can commentarize the POST_ELEM and IMPR_TABLE command and add the subsequent commands editing the load in AFFE_CHAR_MECA.

If You need more automatization You can extract the surface area from table tab_post using python commands and calculate using python the load value to input, but I think the first way is quite easy and sufficient.

Johannes Ackva
______________________________________________________________________
Ingenieurbüro für Mechanik
Dr.-Ing. Johannes Ackva
Markgrafenstr. 21
D 91717 Wassertrüdingen

______________________________________________________________________
next CODE-ASTER-courses

*** Code-Aster QuickStart, 8-9 of May 2012, at Gompute User meeting in Göteborg, Sweden
www.simdi.se

CODE-ASTER-courses at Ingenieurbüro für Mechanik, Germany

*** SALOME and CODE-ASTER for beginners and nearly-beginners
4 days, Wed 19 Sep- Sat 22 Sep 2012

*** DYNAMIC ANALYSIS WITH CODE-ASTER
2 days, Thursday 18 Oct-  Fri 19 Okt 2012
www.code-aster.de

Last edited by Johannes_ACKVA (2012-03-24 14:53:34)

Ingenieurbüro für Mechanik
D 91717 Wassertrüdingen / Germany

www.code-aster.de                                                Training & Support for NASTRAN and CODE-ASTER

Offline

## #3 2019-02-18 09:22:33

Robin
Member
Registered: 2016-04-04
Posts: 12

### Re: Easy question: how to set a force on a surface?

Hello everybody,

This is an old post but I found it very useful as a starting point, although it was not an option for me to manually copy/paste the surface and POST_ELEM/MASS_INER didn't apply to all the cases I needed to deal with (heat transfer/mechanics, 1D/2D/3D...). As Johannes suggest, python allows a better automation of the procedure. Note that I didn't wanted to manually re-implement sums (like eg. beginning_with_code_aster-jp_aubry-20190129.pdf §18.4 p253, which may be helpful for other needs).

Basically, I define a dummy heat transfer model (AFFE_MODELE), a dummy unit field (CREA_CHAMP), integrate it over a group (POST_ELEM/INTEGRALE) and retrieve the integral in python (EXTR_TABLE). The procedure requires DEBUT/PAR_LOT='NON'.

Any feedback or idea to simplify the procedure is welcome.

Have a nice week!

from Utilitai.Table import Table    # necessary for EXTR_TABLE
DEBUT(PAR_LOT='NON')    # necessary for table manipulation
mesh    = LIRE_MAILLAGE()
modl    = AFFE_MODELE(
MAILLAGE    = mesh,
AFFE    = _F(
TOUT    = 'OUI',
PHENOMENE    = 'THERMIQUE',
MODELISATION    = '3D_DIAG',
),
)
unit    = CREA_CHAMP(
TYPE_CHAM    = 'NOEU_TEMP_R',
OPERATION    = 'AFFE',
MAILLAGE    = mesh,
AFFE    = _F(
TOUT    = 'OUI',
NOM_CMP    = 'TEMP',
VALE    = 1,
),
)
integ    = POST_ELEM(
MODELE    = modl,
CHAM_GD    = unit,
INTEGRALE    = _F(    # retrieves VOL, INTE_TEMP and MOYE_TEMP
GROUP_MA    = 'myGroup',
TYPE_MAILLE    = '2D',
NOM_CMP    = 'TEMP',
),
)
surfa    = integ.EXTR_TABLE().VOL[0]    # python variable containing the surface of 'myGroup'

Offline