Fluids

Different boundary conditions on the same face

• Diogo Martinho
Subscriber

Hey all,

I have a question in regard to the different boundary conditions to apply. I have an electrical field, and basically I want to have a flux applied there but at the same time I wanted to have a certain potential on the wall.  I thought that if I initialized the domain with a certain value it would work, but it didn't as the value later changes (makes sense).

What I am trying to do, it would be similar to having a wall at 300K and at the same time having a heat flux. So that wall would always be at 300K but the gradient would give the variation to the next node.

Best regards

• Rob
Ansys Employee

Using the heat analogy as I don't understand the electrickery stuff: it's been about 30 years since I last studied it. Thanks for explaining!

The problem is you're trying to fix both the value and the rate: one MUST float to allow the other to be true. Otherwise you are fixing the outer value, then the wall adjacent cell value, but to avoid problems the next cell is also fixed etc. The whole domain is then purely a function of the outer temperature and set gradient. Not the result of anything else that may or may not be happening.  It's a common misconception. We set a flux in an experiment (or temperature) and measure the other, we can't set both: simulation is much same but in a computer.

• Diogo Martinho
Subscriber

So basically to guarantee the right range of temperatures, one has to initialize the solution with temperature and then the flux will "adjust" the solution?

• Rob
Ansys Employee

The initial condition is just that, a starting point or time = zero for a transient run. The end result is then a function of time and flux (transient) or entirely the flux (steady).

• Diogo Martinho
Subscriber

When I read the answers I understand but then I am trying to model it the question comes up again... So, basically, by specifying the fluxes where/how do you specify the background values. Like the same as having a room where I would have a flux coming in from the door, a flux going out through the window but how would I define the value of the temperature itself?

• Rob
Ansys Employee

Asking to clarify is good. We're here to teach as much as help, possibly more so the former.

That's the fun part. If we add some Watts through one wall, the domain will heat up. At the other side we'd typically set a temperature. The flux then pushes against that temperature so the bulk domain will warm up to suit the set flux and temperature. Poorly set boundary conditions may then give very silly temperatures.

A flux in and a flux out will typically give a result of infinity or absolute zero for temperature. This usually is enough to cause divergence or lots of limit warnings.

So, in most cases we'd have some boundaries as heat flux and some as temperature (that may be a convection boundary, but it still gives us a temperature anchor).