How to handle non-uniform boundary conditions?

Hi,for a steady-state heat conduction problem,given two boundary conditions (T0, q0) for a 2D rectangular shape as shown in the figure, assign non-uniform temperatures to T0 and non-uniform heat flux densities to q0(The values of T0 and q0 are different at each point, and there is no explicit functional relationship with the position of the points).
e23402515e58c821c6af53686749265
Then how to establish the steady-state heat conduction variational equation and boundary conditions, and solve it.

What is the relationship between T0 and a degree of freedom at the boundary then?

Assuming linear triangular elements are used, each node has only one degree of freedom.

My point was that say the face with T0 consists of 3 nodes, (0,0), (0,0.5), (0,1), you want to assign some data, say d0,d1,d2 to them. How do you know Which data that should be assigned to Which point?

Dear dokken, you don’t need to worry about the order of the data. The focus of this problem is how to represent non-uniform boundary conditions (temperature and heat flux density): for temperature, assuming there are n nodes at the boundary, a set of random numbers can be assigned starting from the beginning of the boundary until the end (the same can be done for heat flux density). I am concerned about how to represent boundary conditions with different values for each node in fencis. I hope to get this resolved. Thank you.

When you say start from the beginning until the end, you rely on some ordering.
I’ve already posted a solution for this at: How to impose a pressure distribution from a data file as a boundary condition (loading)? - #5 by dokken