Original question is here, but I think, here can be the people who knows sfepy and finite element method.
Well, I want to model the vector gravity field, i.e. (in weak formulation)
Here G is target vector field, rho is a density - value, which is constant parameter for a given material.
My problem definition file:
import numpy as nm
filename_mesh = 'my.mesh'
regions = {
'Omega' : ('all', {}),
'Overground' : ('nodes of group 1', {}),
'Underground' : ('nodes of group 2', {}),
'Brick' : ('nodes of group 3', {}),
}
field_1 = {
'name' : 'gravity',
'dtype' : nm.float64,
'shape' : (3,),
'region' : 'Omega',
'approx_order' : 1,
}
variables = {
'G' : ('unknown field', 'gravity', 0 ),
'g' : ('test field', 'gravity', 'G'),
}
ebcs = {
}
materials = {
'm' : ({'rho': {
'Overground': 1.0e-7,
'Underground': 1.0e+0,
'Brick': 1.0e+5
}},
),
'n' : ({'G' : 1.0 }, )
}
equations = {
'Gravity' : """dw_div_grad.1.Omega( g, G ) = dw_div.1.Omega( m.rho, g )"""
}
solvers = {
'ls' : ('ls.scipy_direct', {}),
'newton' : ('nls.newton', {
'i_max' : 1,
'eps_a' : 1e-10,
}),
}
Result:
I expected the field, uniformly directed to the brick, but got something diverging from it (that's not a big problem, I think it's just a sign issue). Also, I am not satisfied with increasing value in bottom-left corner.
What I have to do to correct the model?
Thanks in advance.