Hi all, I'm trying to solve
I'm trying to solve a conduction problem in materials with different diffusivities. Think about a wall made of some layers of different materials.
I started from the laplacianFoam solver, and modified it as follows:
in the createFields.H file, I changed the diffusivity DT from a constant to a field. Here's the code
the solver re-compiled fine, so I suppose to have performed things in the right way
then I followed the instructions I found here:
I tried to use setFields to give to DT the values I wanted in the different regions of my mesh (a simple blockMesh: I have to simulate a flat wall with thermal leaks), but as I create the file "DT" in the "0" folder and I run setFields, the resulting "DT" file returns me just a uniform field with DT equal to the default value I set for it in the setFieldsDict.
Have you got any clue about that? I'm rather new to OpenFOAM, so I could be stuck on a trivial thing...
And, do you think that my way of changing the solver is the right one?
Thank you very much in advance!
Hi Diego, Sounds like the r
Sounds like the right approach.
I think you should focus on the possibility that you're doing something wrong with setFields. Try to play around with the dambreak tutorial, for example.
Another thing you need to get good results: use harmonic interpolation of DT in the laplacian. Otherwise you get some smearing on the interface between media. It can be shown formally that harmonic rather than arithmetic (=linear) interpolation is what you need for a correct discretization.
Hi Ola Thank you for the ti
Thank you for the tip on the interpolation scheme, and for the "thumbs up".
The approach was indeed right, and I just systematically mistook the order of the two vertices defining boxes in setFields. The results I got are satisfactory!
Now I'm trying to impose a mixed condition at the boundaries and I saw that it is not so immediate... let's see
by now, many thanks!!
|All times are GMT -4. The time now is 16:53.|