Heat Flux Boundary Condition for 1D Line Element

Hello everyone,

I have a question regarding boundary conditions in FreeFEM++. Specifically, I would like to know if it is possible to apply a heat flux boundary condition to a one-dimensional line element at any of its boundaries.

For context, I am working on a heat transfer problem where I need to specify a heat flux instead of a temperature at one of the boundaries. The problem statement and the .edp file are attached below. I would appreciate any guidance on how to implement this in FreeFEM++, or if there are specific commands or examples you could point me to.

Thank you!!!

trial.edp (8.0 KB)
image

I think that you need to set non-homogeneous Neumann BC.
For your heat equation it means -K\frac{dT}{dx}n=g, with g a given boundary flux, n the external normal (+1 on the right, -1 on the left of the domain)
For that you juste delete the +on(1,T=1000)
and replace it by +int0d(Th)(g*v)
However if you want to put different conditions on the left and on the right, you need to define boundary labels, I don’t know how to do it in 1d.

1 Like

Thanks for the suggestion, it worked

I’m working on a simulation where a material surface is undergoing ablation (material is being “burned” or removed) over time, which causes the surface to shrink. In FreeFem++,
I need to do the following:
Update the mesh: As the material shrinks, I need to update the mesh at each time step to reflect this shrinkage and also remesh the surface.
Update the finite element space (Fespace): After the mesh is updated, I also need to update the finite element space to reflect the new geometry.
Transfer old solution fields: After the mesh is updated, I need to transfer my old solution fields (like temperature, density, etc.) to the new mesh.

My questions are:

How do I properly update the mesh and remesh during the simulation?
How do I reinitialize the finite element space after remeshing?
How do I transfer the old solution fields (temperature, density, etc.) to the new mesh? Should I interpolate them, or can I initialize them based on the new geometry?
It would be helpful if you can provide any guidance on how to implement this in FreeFEM++, or if there are specific commands or examples you could point me to.
Thank you!!!

There are some examples of use of movemesh in the FreeFem documentation. It shows how to more the mesh, fespace and solutions.
If you redefine your mesh you need to interpolate to define new functions.
Such interpolation is simply done as v=u where u is the field to interpolate, and v is the interpolated field. u and v must be previously declared in their respective fespace.

1 Like