CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Conditional patching? (https://www.cfd-online.com/Forums/openfoam-solving/157934-conditional-patching.html)

Londo August 11, 2015 11:10

Conditional patching?
 
How do I do conditional patching? Basically I am looking at two different scenarios:

1) Timed change. Let's say that I want to change a temperature of a certain region in the mesh at t = t0.

2) Property conditional change. Let's say that I want to open a valve when I reach a certain pressure value (let's say, max(p) = p_max)?

Can be this done without meddling with the code?

hjasak August 12, 2015 00:27

Yup. Use a mixed boundary condition and switch the value fraction. That will do most things.

If you want to be really fancy, you can have a topologically changing mesh and a rematch topo modifier to move faces from one patch to another

Londo August 12, 2015 10:26

First of all, thank you for the reply.

Quote:

Originally Posted by hjasak (Post 559210)
Yup. Use a mixed boundary condition and switch the value fraction. That will do most things.

But this works only on the boundaries. What if I want to suddenly change something inside the computational domain? Let's say that I have an ignition source that I shut off after a certain time?

Quote:

Originally Posted by hjasak (Post 559210)
If you want to be really fancy, you can have a topologically changing mesh and a rematch topo modifier to move faces from one patch to another

That seems somewhat cumbersome. Is there a simpler way?

ssss August 12, 2015 12:06

You can use groovyBC for that task, it will let you use conditional expressions without digging with the boundary condition code


All times are GMT -4. The time now is 16:27.