
Hi!
I got a question how to go about setting up a coupled Thermal- Electrical problem, where the heating comes from the Joule heating of a electrically conductive part. The properties are temperature dependent. Is there some similar example?
PS! Robert, We met at EuroScipy and I only now got around to join the list.

Hi Bernt-Ola,
On Sat, Dec 6, 2008 at 3:53 PM, bosman <berntola....@gmail.com> wrote:
Hi!
I got a question how to go about setting up a coupled Thermal- Electrical problem, where the heating comes from the Joule heating of a electrically conductive part. The properties are temperature dependent. Is there some similar example?
PS! Robert, We met at EuroScipy and I only now got around to join the list.
Yes, EuroSciPy was great. I think Robert will react on Monday, but in the meantime, you can try to look at scripts in the input/ directory, for example I think that input/navier_stokes.py is also a coupled problem.
Ondrej

Hi Bernt-Ola!
bosman wrote:
Hi!
I got a question how to go about setting up a coupled Thermal- Electrical problem, where the heating comes from the Joule heating of a electrically conductive part. The properties are temperature dependent. Is there some similar example?
So far I have done only some preliminary tests with a piezo-electric material - see input/piezo.py for an example of computing the steady periodic response of the medium, assuming a synchronous harmonic excitation of a single frequency. There is a coupling of elastic displacements and the electric field there, and IMO the temperature dependence could be added easily too.
There are no Maxwell equations examples as the edge elements are not implemented (yet). But I am not an expert in electrical problems, so if you show me the exact PDEs you need to solve I may tell you more (amount of work necessary to implement it etc.). I am definitely interested in being able to solve thermal-electric problems with the code.
PS! Robert, We met at EuroScipy and I only now got around to join the list.
Better now than never! EuroScipy was really cool, meeting so many great people with common interests. I have lots of photos from Leipzig, have to put them somewhere on-line.
Best regards, r.

Thanks Ondrej and Robert!
I'm going to have a look at the examples and I'll try to put down the set of equations I want to solve, sometime in the near future.
I'm sure I'll get back with some more questions later.
Bernt-Ola

On Mon, Dec 8, 2008 at 8:27 PM, bosman <berntola....@gmail.com> wrote:
Thanks Ondrej and Robert!
I'm going to have a look at the examples and I'll try to put down the set of equations I want to solve, sometime in the near future.
I'm sure I'll get back with some more questions later.
Looking forward. Robert, please put your pictures online soon, before it becomes obsolete. :) Well, I should put the videos online as well. :)
Ondrej

Hi!
Here are the equations:
c * dT/dt = Q + div ( k * grad T ) # Heat equation
div ( s * grad phi ) = 0 # Electrical potential
Where
Q = s * ( grad phi ) ^2 # Source term
c = Specific heat
k = Thermal conductivity
s = Electrical conductivity
I had a look at the piezo example and got some idea how it works but I think I need some assistance here. I'm more of a old school person when it comes to FEM but eager to learn.
Bernt-Ola

Hi Bernt-Ola!
bosman wrote:
Hi!
Here are the equations:
c * dT/dt = Q + div ( k * grad T ) # Heat equation
div ( s * grad phi ) = 0 # Electrical potential
Where
Q = s * ( grad phi ) ^2 # Source term
c = Specific heat
k = Thermal conductivity
s = Electrical conductivity
So T, phi are the unknowns, right?
I had a look at the piezo example and got some idea how it works but I think I need some assistance here. I'm more of a old school person when it comes to FEM but eager to learn.
Such a problem can almost be solved by what is in sfepy now. Only the nonlinear source term Q would have to be added.
div ( k * grad T ) .. dw_laplace c * dT/dt .. dw_mass_scalar (see input/time_poisson.py) div ( s * grad phi ) .. dw_laplace
In sfepy, all terms are implemented using a weak formulation, see the Introduction in sfepy_manual.pdf - this should be done for the Q term too:
denoting the test function \psi: Q \approx \int_{\Omega} s (\Nabla \phi)^2 \psi
Then, to resolve the nonlinearity, the Newton method will be used that requires the derivative dQ/d\phi - the new sfepy term would have to do just that - given \phi return upon request Q or dQ/d\phi.
I am willing to implement this, but not before the first week of January
- I will not be (99%) available starting tomorrow evening.
Of course, you may try your luck yourself in the meantime... The term implementation are in sfepy/terms, look at termsLaplace.py, termsPiezo.py, for example.
r.

Hi!
Many thanks for the response!
I am willing to implement this, but not before the first week of January
- I will not be (99%) available starting tomorrow evening.
It's no rush, so whenever you find time that's fine. I'm going to have look at the files you suggested and try to understand the code.
Merry Christmas!
Bernt-Ola

bosman wrote:
Hi!
Many thanks for the response!
You are welcome!
I am willing to implement this, but not before the first week of January - I will not be (99%) available starting tomorrow evening.
It's no rush, so whenever you find time that's fine. I'm going to have look at the files you suggested and try to understand the code.
ok, good luck :)
Merry Christmas!
I still have some presents to buy, you know - lazy evaluation.
Merry Christmas too!
r.

Hi!
Robert Cimrman wrote:
bosman wrote:
I am willing to implement this, but not before the first week of January - I will not be (99%) available starting tomorrow evening. It's no rush, so whenever you find time that's fine. I'm going to have look at the files you suggested and try to understand the code.
I have implemented the source term, you can get the experimental sfepy branch by:
git clone git://github.com/rc/sfepy-terel.git
Attached is an example simulation - unpack it into your sfepy directory, and launch it by:
$ ./terel/terel.py
The results will be saved in mesh_circ21.*.vtk files.
BTW. the equations you have sent are not coupled entirely - the (static) electrical potential can be solved first, and then the time-dependent heat conduction using the pre-computed source term - that's what I did.
Full coupling, i.e. having the electrical potential equation dependent on the temperature, could be solved too, but the derivative dQ/dphi would have to be implemented - I did not implement it, as it was not needed for the problem as it is now.
Let me know if it is what you need - then I will merge the branch to the master repo at sfepy.org.
cheers, r.

Hi!
Many thanks for the work!
However I get some problems getting the repository.
I have implemented the source term, you can get the experimental sfepy branch by:
git clone git://github.com/rc/sfepy-terel.git
When I do this I get!
remote: Counting objects: 4270, done. remote: Compressing objects: 100% (1293/1293), done. remote: Total 4270 (delta 2955), reused 4270 (delta 2955) Receiving objects: 100% (4270/4270), 8.25 MiB | 185 KiB/s, done. Resolving deltas: 100% (2955/2955), done. warning: remote HEAD refers to nonexistent ref, unable to checkout.
There is only a hidden file structure where the files should be, any ideas why this didn't work.
Bernt-Ola

bosman wrote:
Hi!
Many thanks for the work!
However I get some problems getting the repository.
I have implemented the source term, you can get the experimental sfepy branch by:
git clone git://github.com/rc/sfepy-terel.git
When I do this I get!
remote: Counting objects: 4270, done. remote: Compressing objects: 100% (1293/1293), done. remote: Total 4270 (delta 2955), reused 4270 (delta 2955) Receiving objects: 100% (4270/4270), 8.25 MiB | 185 KiB/s, done. Resolving deltas: 100% (2955/2955), done. warning: remote HEAD refers to nonexistent ref, unable to checkout.
There is only a hidden file structure where the files should be, any ideas why this didn't work.
The problem is that I uploaded the "terel" branch only, but not the master branch. I am in process of learning git :)
This works for me:
$git clone git://git.sympy.org/sfepy.git Initialized empty Git repository in /home/share/software/packages/sfepy/.git/ remote: Counting objects: 4221, done. remote: Compressing objects: 100% (1377/1377), done. remote: Total 4221 (delta 2881), reused 4151 (delta 2822) Receiving objects: 100% (4221/4221), 8.29 MiB | 967 KiB/s, done. Resolving deltas: 100% (2881/2881), done. $cd sfepy $git branch terel $git checkout terel Switched to branch "terel" $git remote add -t terel terel-origin git://github.com/rc/sfepy-terel.git $git pull terel-origin
Ondrej, how to setup a repository on github, that contains only terel (and master?) branches, but no other branches I have locally, so that 'git clone' works?
r.

Hi!
Now it works!
I just ran the example and it looks good, I'm going to have a look in more detail and try to understand how you implemented it and probably get back with some questions.
Many thanks!
B-O

bosman wrote:
Hi!
Now it works!
Glad to hear that.
I just ran the example and it looks good, I'm going to have a look in more detail and try to understand how you implemented it and probably get back with some questions.
Many thanks!
You are welcome, it's good to know that the code might be actually useful not only to our team. Ask at will, of course.
r.
participants (3)
-
bosman
-
Ondrej Certik
-
Robert Cimrman