Hello guys, I’ve been trying to solve an electro-Chemo-elasticity coupling problem, and I’ve been faced with some problems.
I need to apply several properties on the same material, for example:
electrode: modulus of elasticity and specific mass
gel:modulus of elasticity and mass specifies , diffusibility.
I visualized a reference model, which helped me at first, but it was not enough to solve my problem completely. https://jsdokken.com/dolfinx-tutorial/chapter3/subdomains.html.
. If anyone has any comment about the code, please, don’t hesitate to tell me.
I wonder if I should create a discontinuous function space whenever I determine a property, since that function space will already have a change.
do not believe that there is a need to present a code of proof of error, because it is a conceptual doubt and not a mistake, I think. I put my mesh only to clarify the function of the variables present in the code
#domain
domain, cell_tags, facet_tags = gmshio.read_from_msh("malhas/malha_com_eletrodo_05.msh", MPI.COMM_WORLD,0, gdim=2)
#Space functions
Q = fem.FunctionSpace(domain, ("DG", 0))
Emod = fem.Function(Q) #U2 = ufl.VectorElement("Lagrange", domain.ufl_cell(), 1) #<vector element with 2 components of <CG1 on a quadrilateral>>
#Defining the space of each "material in the domain"
def tag(n_tag):
return cell_tags.find(n_tag)
eletrodo_sup = tag(26)
eletrodo_inf = tag(27)
gel_p= tag(28)
#eletrodo_inf.mark(materials, 0)
def mat_features(material, constanste):
for i in range(len(material)):
Emod.x.array[material[i]] = np.full_like(material[i],constanste[i], dtype=PETSc.ScalarType)
#A ordem de entrada das propriedades na lista deve ser equivalente ao espaço no qual o material ocupa dentro do dominio
material_ = [gel_p,eletrodo_inf,eletrodo_sup]
Gshear = mat_features(material_, [0.003e-6, 0.034e-6 ,0.2e-6])
Kbulk = mat_features(material_, [2000*0.003e-6,2000*0.034e-6,2000.0*0.2e-6])
the main question is whether to create other variables similar to Fem.functionSpace("DG", Domain.Cell_type() , 0 ) to store the values of each new property, or whether there is a more simplified method for such characterization