Hey Robert,
alright. Thank you very much in advance!
Schöne Grüße & kind regards from Germany
i.A. Manuel Feuchter
Competence Unit Engineering
-------------------------------------------------------------------------------------------------------------------------------------
Dr.-Ing. Manuel Feuchter
Head of Multibody & Structure Analysis
TWT GmbH - Science & Innovation
Ernsthaldenstraße 17
D-70565 Stuttgart
E-Mail: manuel.feuchter@twt-gmbh.de
Mobil: +49 162 / 212 48 16
www.twt-gmbh.de
-------------------------------------------------------------------------------------------------------------------------------------
Geschäftsführung: Dr. Dimitrios Vartziotis, Joachim Laicher (Stv.), Frank
Beutenmüller (Stv.)
Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778
Umsatzsteuer: ID-Nr.: DE147841145
-------------------------------------------------------------------------------------------------------------------------------------
Von:
Robert Cimrman <cimrman3@ntc.zcu.cz>
An:
sfepy@python.org
Datum:
29.08.2017 14:31
Betreff:
[sfepy] Fwd:
SfePy - Electro-thermo-mechanics problem
Hi Manuel,
I am forwarding your message to the mailing list, because I could not reach
you
using your address (Connection timed out error). I will answer to the list
as well.
r.
-------- Forwarded Message --------
Subject: SfePy - Electro-thermo-mechanics problem
Date: Mon, 28 Aug 2017 12:31:33 +0200
From: Manuel Feuchter <manuel.feuchter@twt-gmbh.de>
To: cimrman3@ntc.zcu.cz
Hey Robert,
first of all: SfePy is an amazing project! I am getting to like SfePy more
and
more :)
I tried to start a thread at
https://mail.python.org/mm3/archives/list/sfepy@python.org
But unfortunately am I not able to. I recieve a "Server Error (500)"
. So I try
it via Email :)
Concerning SfePy: I get stuck with a few problems/questions:
Background: I would like to set up a subsequent coupled system (so not
fully
coupled):
1. electric field evolves an electric current (at the end of the day, I
would
like to apply the electric field as an time (time step) dependent function.)
2. electric current results in liberated heat by joule heating
3. the liberated heat drives the thermal expansion und results in thermal
stresses
# 1:
------
Concerning example:
http://sfepy.org/doc-devel/examples/multi_physics/thermal_electric.html
(multi_physics/thermal_electric.py)
Equation: dw_laplace.2.Omega( m.electric_conductivity, psi, phi ) = 0
Your comment states:
"""
First solve the stationary electric conduction problem. Then use its
results to solve the evolutionary heat conduction problem.
"""
Alright. However, just to understand it comprehensively? When you say you
solve
the "stationary electric conduction problem". Does this imply
actually two
equations?
$(1) \textbf{E} = -\nabla \phi$\\
$(2) \textbf{j} = \frac{1}{\varrho}\cdot\textbf{E}$
Is this right?
# 2:
------
Assuming I got it right, I would like to solve the electric conduction
problem
in terms of a quasi-static circumstance (external electric potential and
internal resistivity will change).
This means I would like to solve the electric conduction problem for every
time
step that I run the simulation and hence use the result (of $\textbf{j}$)
for
every next time step.
I tried so, however I must have gotten sth wrong. The apparent electric
field
is not used?! Am I right? And how am I able to achieve so?
(please find my code below)
# 3:
------
For the heat conduction equation: ... = dw_electric_source.2.Omega(
m.electric_conductivity, s, phi )
Here, for the source term $\textbf{p} = \varrho \cdot \textbf{j}^2$ is
solved?
And how does the specific heat gets involved in your equation? Is the source
term divided by the thermal conductivity [W/mK]?
Does specific_heat to be named exactly like this to be involved in the
'dw_volume_dot.2.Omega( s, dT/dt )' term?
# 4:
------
How am I able to apply a time (time step) dependent function for the electric
potential?!
Looking forward for your reply!
Cheers and kind regards from Germany
Manuel
--------------------------------------------------------
def stress_strain_ext(out, pb, state, extend=False):
"""
Calculate and output strain and stress for given displacements.
"""
from sfepy.base.base import Struct
from sfepy.mechanics import tensors
ev = pb.evaluate
strain = ev('ev_cauchy_strain.2.Omega(u)', mode='el_avg')
stress = ev('ev_cauchy_stress.2.Omega(m.mech_solid, u)',
mode='el_avg')
vms = tensors.get_von_mises_stress(stress.squeeze())
vms.shape = (vms.shape[0], 1, 1, 1)
out['cauchy_strain'] = Struct(name='output_data', mode='cell',
data=strain, dofs=None)
out['cauchy_stress'] = Struct(name='output_data', mode='cell',
data=stress, dofs=None)
out['von_mises_stress'] = Struct(name='output_data', mode='cell',
data=vms, dofs=None)
return out
#! Presettings
#! -------
t0 = 0.0
t1 = 100.0
n_step = 11
# material parameters and constants
lam = 10.0
mu = 5.0
thermal_expandability = 1.25e-5
T0 = 20.0 # Background temperature.
specific_heat = 1.2
thermal_kappa_xyz = 2.0
electric_sigma_xyz = 1.5
#! Options
#! -------
options = {
'ts': 'ts',
'nls': 'newton',
'ls': 'ls',
'output_dir' : output_dir,
'post_process_hook' : 'stress_strain_ext',
}
#! Regions
#! -------
regions = {
'Omega': 'all',
'Omega_Cell_Surface': ('vertices of surface', 'facet'),
'Mech_Mount': ('vertices in (x < 0.05)', 'facet'),
'Mech_Front': ('vertices in (x > 0.95)', 'facet'),
'Therm_inlet': ('vertices in (x < 90.05) & (x >
85.95) & (y > 9.95)',
'facet'),
'Therm_outlet': ('vertices in (x < 0.05)', 'facet'),
'Elec_Phi_0' : ('vertices in (x < 37.05) & (x >
32.95) & (y > 9.95)',
'facet'),
'Elec_Phi_1' : ('vertices in (x < 90.05) & (x >
85.95) & (y < 0.05)',
'facet'),
}
#! Materials
#! ---------
eye_sym = np.array([[1], [1], [1], [0], [0], [0]], dtype=np.float64)
materials = {
'm': ({
'thermal_conductivity': thermal_kappa_xyz,
'electric_conductivity': electric_sigma_xyz,
'mech_solid' : stiffness_from_lame(3, lam=lam,
mu=mu),
'alpha_therm' : (3.0 * lam + 2.0 * mu) * thermal_expandability
* eye_sym
},),
'mech_load': ({'.val': [0.0, 0.0, 0.0]},),
}
#! Fields
#! ------
fields = {
'displacement': ('real', 'vector', 'Omega', 1),
'temperature': ('real', 1, 'Omega', 1),
'potential' : ('real', 1, 'Omega', 1),
}
#! Variables
#! ---------
variables = {
'u': ('unknown field', 'displacement', 2),
'v': ('test field', 'displacement', 'u'),
'T': ('unknown field', 'temperature', 0, 1), # 1 means,
set history "on"
's': ('test field', 'temperature', 'T'),
'phi': ('unknown field', 'potential', 1, 1),
'psi': ('test field', 'potential', 'phi'),
}
#! Initial Conditions
#! -------------------
ics = {
'ic' : ('Omega', {'u.all' : 0.0,
'T.0': 0.0,
'phi.all': 0.0,
}),
}
#! Boundary Conditions
#! -------------------
ebcs = {
'u0': ('Mech_Mount', {'u.all': 0.0}),
't0': ('Mech_Mount', {'T.0': 0.0}),
't1': ('Mech_Front', {'T.0': 0.0}),
'p0' : ('Elec_Phi_0', {'phi.0' : 0.0}),
'p1' : ('Elec_Phi_1', {'phi.0' : 100.0}),
}
#! Equations
#! ---------
equations = {
'potential' :
"""dw_laplace.2.Omega(
m.electric_conductivity, psi, phi )
= 0""",
'heat_conduct' :
"""dw_volume_dot.2.Omega(
s, dT/dt ) +
dw_laplace.2.Omega( m.thermal_conductivity, s, T )
= dw_electric_source.2.Omega(
m.electric_conductivity, s, phi
)""",
'thermo_mech':
"""dw_lin_elastic.2.Omega(m.mech_solid,
v, u)
- dw_biot.2.Omega(m.alpha_therm,
v, T)
= 0""",
}
#! Solvers
#! -------
solvers = {
'ls' : ('ls.scipy_direct', {}),
'newton' : ('nls.newton', {
'i_max' : 1,
'eps_a' : 1e-10,
'eps_r' : 1.0,
'problem': 'nonlinear',
}),
'ts': ('ts.simple', {
't0': t0,
't1': t1,
'dt': None,
'n_step': n_step,
}),
}
--------------------------------------------------------
Schöne Grüße
kind regards
i.A. Manuel Feuchter
Competence Unit Engineering
-------------------------------------------------------------------------------------------------------------------------------------
Dr.-Ing. Manuel Feuchter
Head of Multibody & Structure Analysis
TWT GmbH - Science & Innovation
Ernsthaldenstraße 17
D-70565 Stuttgart
E-Mail: manuel.feuchter@twt-gmbh.de
Mobil: +49 162 / 212 48 16
www.twt-gmbh.de
-------------------------------------------------------------------------------------------------------------------------------------
Geschäftsführung: Dr. Dimitrios Vartziotis, Joachim Laicher (Stv.), Frank
Beutenmüller (Stv.)
Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778
Umsatzsteuer: ID-Nr.: DE147841145
-------------------------------------------------------------------------------------------------------------------------------------
_______________________________________________
SfePy mailing list
sfepy@python.org
https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/