CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Some confusions about baffle faces (https://www.cfd-online.com/Forums/openfoam-programming-development/242879-some-confusions-about-baffle-faces.html)

ruanyg968tf May 17, 2022 05:17

Some confusions about baffle faces
 
1 Attachment(s)
Dear foamers,
I tried to use baffle in my simulation. I founded that different from usual boundary patches, the Sf vectors of the baffle patches point into the patch. That means from the master side which is also owner side, the Sf vectors point from neighbor to owner, and from the slave(neighbor) side, the Sf vectors point from owner to neighbor. This also caused the sign of flux variable at baffle patches opposite.
To illustrate it more clearly, the following is an example. I created a baffle within a straight pipe, and assigned cyclic patch at both sides of the baffle patches. Air flow from left to right. Then I output the Cn(neighbor cell center) and Sf of both the coupled patches. The phi variable at baffle patches are also attached.
Attachment 89832

Code:

interfaceFaces_master.Cn():
40
(
(0.074625 3.83430486498e-06 0.0005)
(0.074625 1.38754588107e-05 0.0005)
(0.074625 3.01297550474e-05 0.0005)
...
(0.074625 0.0198426174048 0.0005)
(0.074625 0.0199178891546 0.0005)
(0.074625 0.0199752158039 0.0005)
)
interfaceFaces_master.nf(): 40{(1 0 0)}
interfaceFaces_master.Sf():
40
(
(7.66860972996e-09 0 0)
(1.24136981614e-08 0 0)
(2.0094894312e-08 0 0)
...
(8.54585932e-08 0 0)
(6.50849065e-08 0 0)
(4.95683921e-08 0 0)
)
interfaceFaces_slave.Cn():
40
(
(0.075375 3.83430486498e-06 0.0005)
(0.075375 1.38754588107e-05 0.0005)
(0.075375 3.01297550474e-05 0.0005)
...
(0.075375 0.0198426174048 0.0005)
(0.075375 0.0199178891547 0.0005)
(0.075375 0.0199752158039 0.0005)
)
interfaceFaces_slave.nf(): 40{(-1 0 0)}
interfaceFaces_slave.Sf():
40
(
(-7.66860972996e-09 0 0)
(-1.24136981614e-08 0 0)
(-2.0094894312e-08 0 0)
...
(-8.54585932e-08 0 0)
(-6.50849065e-08 0 0)
(-4.95683921e-08 0 0)
)

phi:
Code:

interfaceFaces_master
    {
        type            cyclic;
        value          nonuniform List<scalar>
40
(
1.17805511081e-08
3.91885655508e-08
8.93596751304e-08
...
5.38794498107e-07
3.09699716152e-07
1.14214813453e-07
)
;
    }
    interfaceFaces_slave
    {
        type            cyclic;
        value          nonuniform List<scalar>
40
(
-1.17805511081e-08
-3.91885655508e-08
-8.93596751304e-08
...
-5.38794498107e-07
-3.09699716152e-07
-1.14214813453e-07
)
;
    }

Are there any mistakes with my understanding? I didn't find any special treatment of coupled patches for assembling the matrix. Any comments are appreciated.


All times are GMT -4. The time now is 08:04.