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

You are not logged in.

#1 2020-02-16 00:08:36

leonardop93
Member
Registered: 2020-01-21
Posts: 8

Refine mesh before PROPA_FISS

hi

i have created a loop Python for a crack propagation. i refine the mesh with command MACRO_ADAP_MAIL but PROPA_FISS don't use refined mesh but only the initial mesh.
how can i use the refine mesh in PROPA_FISS? propagation works, but I can't select the refined mesh. this is a piece of the code.

 DEBUT(ERREUR=_F(ERREUR_F='ABORT'), PAR_LOT='NON')

mesh = LIRE_MAILLAGE(FORMAT='MED', NOM_MED='Mesh_1', UNITE=2)

mater = DEFI_MATERIAU(ELAS=_F(E=206000.0, NU=0.3))

lista = [0, 1, 2, 3]
NPS = len(lista)

model = [None]*NPS
xfem = [None]*NPS
model0 = [None]*NPS
load = [None]*NPS
resnx = [None]*NPS
fiel = [None]*NPS
listr = [None]*NPS
time = [None]*NPS
table = [None]*NPS
mesh0 =[None]*NPS
model1 =[None]*NPS
ris = [None]*NPS
maraf = [None]*NPS


funzione = DEFI_FONCTION(
    NOM_PARA='INST', VALE=(0.0, 0.0, 1.0, 1000.0, 2.0, 2000.0, 3.0, 3000.0)
)

model[0] = AFFE_MODELE(
    AFFE=_F(MODELISATION=('3D', ), PHENOMENE='MECANIQUE', TOUT='OUI'),
    MAILLAGE=mesh,

xfem[0] = DEFI_FISS_XFEM(
    DEFI_FISS=_F(
        CENTRE=(40.0, 0.0, 2.232),
        DEMI_GRAND_AXE=3.0,
        DEMI_PETIT_AXE=5.0,
        FORM_FISS='RECTANGLE',
        VECT_X=(0.0, 1.0, 0.0),
        VECT_Y=(0.0, 0.0, 1.0)
    ),
    MAILLAGE=mesh,
    TYPE_DISCONTINUITE='FISSURE',
    TYPE_ENRI_FOND='TOPOLOGIQUE'
)


for i in range(1,NPS-1)

    field[i] = RAFF_XFEM(FISSURE=(xfem[i-1], ), RAYON=5.0, TYPE='ZONE')

    maraf[i] = CO('meshr_%d’ %(i))

    MACR_ADAP_MAIL(
        ADAPTATION='RAFFINEMENT',
        CHAM_GD=field,
        CRIT_RAFF_ABS=0.5,
        DIAM_MIN=0.1,
        ELEMENTS_ACCEPTES='IGNORE_PYRA',
        LANGUE='ENGLISH',
        MAILLAGE_N=mesh,
        MAILLAGE_NP1=maraf[i],
        VERSION_HOMARD='V11_7'
)
    IMPR_RESU(FORMAT='MED', RESU=_F(MAILLAGE=maraf[i]), UNITE=)

    model0[i] = MODI_MODELE_XFEM(FISSURE=(xfem[i-1], ), MODELE_IN=model[0])

.......(material,load,ris....)

    xfem[i] = CO('crepa_%d’ %(i))

    PROPA_FISS(
        COMP_LINE=_F(COEF_MULT_MAXI=1.0, COEF_MULT_MINI=0.0),
        CRIT_ANGL_BIFURCATION='SITT_MAX',
        DA_MAX=5.0,
        FISSURE=_F(
            FISS_ACTUELLE=xfem[i-1],
            FISS_PROPAGEE=xfem[i],
            NB_POINT_FOND=(20, ),
            TABLE=table
        ),
        LOI_PROPA=_F(C=0.00005, LOI='PARIS', M=1.0, MATER=mater),
        METHODE_PROPA='SIMPLEXE',
        MODELE=model0[i],
        RAYON=7.0
)

   

FIN()

Offline

#2 2020-02-24 09:45:05

Nicolas
Member
From: EDF Lab Saclay
Registered: 2007-11-29
Posts: 92

Re: Refine mesh before PROPA_FISS

Hello,

I think that the problem is in the definition of MAILLAGE_N in the MACR_ADAP_MAIL command. The inlet is "mesh" but it should be "maraf[i-1]". With "mesh", the new mesh is always based on the initial one.

I suggest that you:
. Move the definition of "NPS" and all the "xxx=[None]*NPS" at the very beginning of the .comm
. Replace "mesh" by "maraf[0]" before the intruction "for i in range(1,NPS-1)"
. Replace "mesh" by "maraf[i-1]" after the intruction "for i in range(1,NPS-1)"

Try these modifications and give me the results.


Gérald NICOLAS
EDF R&D
Responsable du logiciel HOMARD

Offline

#3 2020-02-27 00:17:39

leonardop93
Member
Registered: 2020-01-21
Posts: 8

Re: Refine mesh before PROPA_FISS

hi Nicolas
thank you for the reply

Now i have write a new code that in the first step with i=1, refine the initial mesh near the crack for 3/4 time trought a cicle "for" and propage the crack whit PROPA FISS. The first step work well but for the steps whit i >1, i extract the propagated crack (LSN, LST) whit the command CREA_CHAMP and redefine this crack on the initial mesh whit the command DEFI_FISS_XFEM and repeat the refining for 3/4 time, around the new crack  (updating the CHAM_GD e CHAM_MAJ in MACRO_ADAP_MAIL). After the last refining i have this error:

<F>  <XFEM_21>

Vous avez défini ou moins un fond ouvert et un fond fermé lors d'un appel à
DEFI_FISS_XFEM
Conseil:
Veuillez définir chacun des fonds dans des DEFI_FISS_XFEM différents.

Why?This happen becouse i extract the field ?
In the first step it doesn't happen because I use a crack of the catologue with known shapes?

Offline

#4 2020-02-28 08:50:17

Nicolas
Member
From: EDF Lab Saclay
Registered: 2007-11-29
Posts: 92

Re: Refine mesh before PROPA_FISS

Hello,
I am not an expert with the commands of Code_Aster. You have to define a new concept for every DEFI_FISS_XFEM command. Maybe you didn't?


Gérald NICOLAS
EDF R&D
Responsable du logiciel HOMARD

Offline

#5 2020-02-28 18:23:34

leonardop93
Member
Registered: 2020-01-21
Posts: 8

Re: Refine mesh before PROPA_FISS

hi Nicolas

yes, but i can't understand why in the first step it's all ok, and in the second step no, i delete all concepts for every step

Offline