# Doubt about heat problem

**URL:** https://fenicsproject.discourse.group/t/doubt-about-heat-problem/13586
**Category:** General
**Created:** [February 11, 2024, 7:33pm UTC](https://fenicsproject.discourse.group/t/doubt-about-heat-problem/13586 "2024-02-11T19:33:44Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)
#### Post date: [February 11, 2024, 7:41pm UTC](https://fenicsproject.discourse.group/t/doubt-about-heat-problem/13586/2 "2024-02-11T19:41:49Z")

</div>

> [@janduigamer13](#):
>
> ```auto
> HDF5-DIAG: Error detected in HDF5 (1.10.7) MPI-process 0:
> #000: ../../../src/H5F.c line 366 in H5Fcreate(): unable to create file
> major: File accessibility
> minor: Unable to open file
> #001: ../../../src/H5Fint.c line 1713 in H5F_open(): unable to lock the file
> major: File accessibility
> minor: Unable to lock file
> #002: ../../../src/H5FD.c line 1675 in H5FD_lock(): driver lock request failed
> major: Virtual File Layer
> minor: Unable to lock file
> #003: ../../../src/H5FDsec2.c line 990 in H5FD__sec2_lock(): unable to lock file, errno = 11, error message = 'Resource temporarily unavailable'
> major: Virtual File Layer
> minor: Unable to lock file
> Traceback (most recent call last):
> File "/home/jandui/Documents/MATH code/AAAAAAAAAAAAa/heat_updated.py", line 40, in <module>
> xdmf = io.XDMFFile(domain.comm, "diffusion.xdmf", "w")
> RuntimeError: Failed to create HDF5 file.
> 
> ```

This usually means that you already have a file named `diffusion.h5`, that has been opened by another process and has not been closed. Please check if this is the case, and remove the file.

> [@janduigamer13](#):
>
> Also, how can I create multiple heat points with specific shapes at the square domain with different functions and constants? (I mean, maybe put two heat sourcers (one at center in a circular domain and another one in the left corner with sin or exponential function, just an example)

Heat sources are covered in

> [@Point Sources (Redux)](https://fenicsproject.discourse.group/t/point-sources-redux/13496/6):
>
> Following my post above, with a minor adaptations, a point source can be implemented as follows: # Create a point source for Poisson problem # Author: Jørgen S. Dokken # SPDX-License-Identifier: MIT from mpi4py import MPI from petsc4py import PETSc import dolfinx import dolfinx.fem.petsc import numpy as np import ufl def compute\_cell\_contributions(V, points): # Determine what process owns a point and what cells it lies within mesh = V.mesh \_, \_, owning\_points, cells = dolfinx.cp…

---

_[View the full topic](https://fenicsproject.discourse.group/t/doubt-about-heat-problem/13586)._
