# Tag Info

4

When dealing with conservation laws like your case, you can often make use of the divergence theorem (as you did). You can then express the fact that the total mass within your integration region is preserved by the following surface integral: $$\oint_{\partial \Omega} k \nabla T \cdot \mathbf{n} ~\partial S = 0$$ Now, as it stands, it is irrelevant which ...

4

The solution to the final Poisson equation is defined only up to an additive constant. So you just need to shift the solution vector so the smallest value is zero.

3

Expanding (sort of) on @MPIchael's answer, you can pick any smooth function you like and plug it into the heat equation to give a problem to then work the other way. In numerical methods, we call this the Method of Manufactured Solutions, and it is used extensively for verifying computer programs designed to simulate PDEs. You'll have to add a forcing ...

3

No, you can't lump the $K$ matrix: that would not be a consistent approximation to the second-order differential operator it is supposed to represent. But if you're trying to be a bit more formal, just write out what that lumped mass matrix would actually be: Most rows of the matrix (corresponding to nodes not next to the boundary) would simply add up to ...

2

From the comments, I believe you are struggling with the FEM formulations and therefore fail to see what happens if the diffusion coefficient tends to zero. I don't have access to your book, but I will post here an answer which shows how to discretize the heat equation with the standard Galerkin method. You will then see that, if there is no diffusion, there ...

2

Let's assume the following heat transient heat transfer equation in 1D : $$\frac{\partial T} {\partial t} = \alpha \frac{\partial^2 T}{\partial x^2}$$ If we take its finite difference approximation using an explicit time scheme we obtain : $$\frac{T_i^{t+\Delta t} - T_i^{t}}{\Delta t} = \frac{\alpha}{(\Delta x)^2} (T_{i-1}^{t}-2T_i^{t}+T_{i+1}^{t}) ... 2 Why even bother to simulate the left half? Why not just simulate the right half with the left BC being the constant value? Seems simpler and more accurate to what you want to actually model, because currently you're just going to have a very low slope on the left half due to the low conductivity, but it won't be constant. 2 Normal direction depends on the cell that you are writing equation for. the word outward is relative to the cell under study. In order to write equation for each of cells, i.e. \Sigma \nabla T.n S_f=0, stick to this : \nabla T_{face}=\frac{T_c-T_i}{r_c-r_i} and assume n as outward pointing normal vector for that face. I think your problem is that you ... 2 The Newton-Raphson method can be used to solve non-linear systems of equations. The first step is to write your system as a root finding problem:$$ f(T_n) = \left( \frac{C}{\Delta t} + K \right) T_n - Q_n - \frac{C}{\Delta t} T_{n-1} = 0 $$Taylor expand this equation about an initial guess T^0_n, keeping only the linear term:$$ f(T_n) \approx f(T^0_n)...

2

Because a heat flux has a direction, and from what you are describing, you are adding a heat flux in the normal direction -- out of the domain. So if you started with a constant temperature plane and they draw heat out of it, you'd end up with a negative temperature.

2

An extended answer. For more arbitrary meshes you have to consider that generally CFD/FEM solvers rely on generic data-structures with element and side lists: Element list Side list Consider the following pictures, which is the standard case for simple Cartesian meshes. Since there is a single plus and a single minus side on each face, the definition is ...

2

In these slide there are some comments about the energy. At pag 4 it focus on the fact that this energy is not a physical energy, but it is a mathematical tool. At pag 8 it observes that: From a physical point of view it seems reasonable that a the energy will decrease in a system without any heat source And after this the author defines another ...

2

TL DR: $$u_1(x_1) = \cos(2\pi~(\frac{x_1}{L_1}) - \pi) + 1$$ $$u_2(x_2) = \cos(2\pi~(\frac{x_2}{L_2}) - \pi) + 1$$ $$u(x,t) = \exp(-a t) u_1(x_1) u_2(x_1)$$ How to construct it: Sines and cosines are easily differentiable so they make a good starting point to construct such a solution. We chose a section and offset of the cosine which has a derivative of ...

1

The applied division is fine, what went wrong here, is the application of Stoke's theorem. If you multiply with the test function you get following term: $$\int \frac{1}{c_p}\nabla\left(-k\nabla u\right) v d\Omega$$ But $$\int \frac{1}{c_p}\nabla\left(-k\nabla u\right) v d\Omega \neq \int \frac{1}{c_p} \left(k\nabla u\right) \cdot \left(\nabla v\right) d\... 1 For a linear PDE, like the Laplace equation, when you discretize it you should get a linear system. Since you're 1D, the Thomas algorithm should be able to solve the system, and it's executed by running over the system once; Thomas algorithm is a direct solver, not an iterative one. If I understand your question correctly, you're asking what happens if you ... 1 I was expecting to see my solution in the right half and then having the left half mostly constant with a value of 0 and rapidly changing close to the interface for continuity. This would make sense given that the left half is mostly an insulating material. This assumption is wrong. Small conductivity simply means that you have small heat flux, but by no ... 1 Based on our discussion in the comments, it seems vtkCellDataToPointData is what you want to convert volume shrinkage, which is stored as cell data, to nodal values or point data. I think it's possible cause volume shrinkage (\frac{\Delta V}{V}) is defined as trace of strain tensor and there is no reason that that parameter can't be interpolated to the ... 1 You don't need MFnx answer to find out why if k = 0, h also MUST be zero (h = 0). Look at your initial PDE for heat transfer:$$\rho C_{p}\frac{\partial T}{\partial t} = k \frac{\partial^{2} T}{\partial x^{2}}$$If k = 0, so:$$\rho C_{p} \frac{\partial T}{\partial t} = 0$$Since your density and heat capacity are not zero, then:$$\frac{\...

1

In the comments Christian directed me towards lateral Cauchy problems and the fact that this is a textbook example of an ill-posed problem. Following this lead, I found that this is more specifically know as the sideways heat equation. As an alternative to the suggested quasireversibility method (again Christian), there is a proposed sequential solution in ...

1

The choice of the boundary conditions is dependent on the physics you want to model. If you're doing heat diffusion through a lake, and you want constant temp on top you'll have a different boundary condition than for constant heat flux out of the top (which appears to be what you want). I'm assuming that you want the bottom of the lake to have no heat flux (...

1

numpy arrays and methods are incredibly helpful. They are usually optimized and much faster than looping in python. Always look for a way to use an existing numpy method for your application. np.roll() will allow you to shift and then you just add. I learned to use convolve() from comments on How to np.roll() faster?. I haven't checked if this is faster or ...

1

The natural convection of the oil shouldn't be an issue and can be solved without any 'assumptions' to be made. The challenge comes with the diodes temperature control. CFD doesn't currently have a temperature controlled heat flux, so some assumptions will have to be made. The simplest assumption would be to just assign a temperature of 150C and assume it ...

1

Thanks for asking your question. It really made me delve alot deeper into the topic of boundary conditions. I am still a rookie in this topic, but I'll try to answer your question anyways. Your major problem seems to be that your units are not correct. Your equation for radiative heat flux has the unit $[\frac{\text{W}}{\text{m}^2}]$, while the Neumann ...

1

Since Laplacian is an elliptic operator you are looking for the Cholesky decomposition of the assumed constant diffusion matrix $D$: $$D = LL^T$$ Therefore the parabolic equation may be written as: $$\partial_t u=-\nabla^T(D\nabla u)=-(L^T\nabla)^T(L^T\nabla u)=-\tilde{\nabla}^T(\tilde{\nabla} u)=-\tilde{\nabla}^2u$$ Naming $\tilde{\nabla}=L^T\nabla$ and ...

1

Combinatorial Laplacian ? It depends on what you expect from your solution. Something reasonable to expect is that your solution should be independent of the way you mesh your surface (or as independent as possible). If you want that, then clearly a combinatorial graph Laplacian is not what you need, since the result would be completely different if you ...

1

If you have a cloud of points and you don't want to use mesh-based methods like FEM or FVM, a possibility is to use a mesh-free method like the Finite Point Method. For instance, you could have a look at this article: Tatari, M., Kamranian, M., & Dehghan, M. (2011). The finite point method for the p-Laplace equation. Computational Mechanics, 48(6), 689-...

1

Regarding your issue of multigrid taking longer than Gauss-Seidel: It could be that you didn't code the interpolation/restriction operations very efficiently. Do you make sure to take full advantage of the sparsity of the matrices? We write the coarse grid operator as something like RAI, but you shouldn't multiply out the matrices directly. All three are ...

Only top voted, non community-wiki answers of a minimum length are eligible