CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   coupled boundary condition using swak/groovyBC (https://www.cfd-online.com/Forums/openfoam/126521-coupled-boundary-condition-using-swak-groovybc.html)

atoof November 19, 2013 07:54

coupled boundary condition using swak/groovyBC
 
Dear Bernhard,

Is there any possible to use a thermally coupled boundary condition between two regions by swak (or groovybc)?

I have two solid and fluid regions where the following boundary condition should be satisfied.
Code:

-Ks * grad(Ts) = h * (Tf - Ts)
where Ks and h are known constants.

Best Regards,

Hossein

gschaider November 19, 2013 12:48

Quote:

Originally Posted by atoof (Post 462522)
Dear Bernhard,

Is there any possible to use a thermally coupled boundary condition between two regions by swak (or groovybc)?

I have two solid and fluid regions where the following boundary condition should be satisfied.
Code:

-Ks * grad(Ts) = h * (Tf - Ts)
where Ks and h are known constants.

Best Regards,

Hossein

If you manage to set them up as mapped patches this might be possible with the mapped-function (see examples and the incomplete reference)

But why do you want to do this. I think the BC you describe is already in the built in functions (don't know the name)

atoof November 20, 2013 07:37

Quote:

Originally Posted by gschaider (Post 462563)
If you manage to set them up as mapped patches this might be possible with the mapped-function (see examples and the incomplete reference)

But why do you want to do this. I think the BC you describe is already in the built in functions (don't know the name)

Dear Bernhard,

Thanks to reply. I am looking around these functions in the forum, but I have not got to a definitive answer. The nearest function as I've known so far is turbulentTemperatureCoupledBaffleMixed that used in multi region conjugate heat transfer solver.

I intended to apply the BC defined in the previous simply between solid and fluid regions in a laminar incompressible flow by swak. Do you suggest to manipulate above BC to achieve my own BC or define a new BC according to the simulation?

Could you please introduce me a mapped patches is suitable for that BC?

Thanks again,

Hossein

Tobi November 20, 2013 07:57

Hey Hossein,

in my opinion it should be possible to adapt the turbulent... BC on the Interface between both regions. I always use this BC but I never had a laminar flow Situation.

I think you should test it out.

atoof November 20, 2013 08:24

Quote:

Originally Posted by Tobi (Post 462699)
Hey Hossein,

in my opinion it should be possible to adapt the turbulent... BC on the Interface between both regions. I always use this BC but I never had a laminar flow Situation.

I think you should test it out.

Thanks Tobias,

Indeed, I created a solver that the properties of fluid interpolate from a lookup table according to the fluid temperature. To develop my solver to simulate fluid flow and solid temperature in a multi region (solid+fluid) domain, I need the above boundary condition in the interface. Therefore h value in boundary condition should be interpolated in each cell of fluid region.

Do you think, the turbulent... BC can be adapted for laminar flow according to above simulation?

Hossein

atoof November 20, 2013 09:38

Quote:

Originally Posted by gschaider (Post 462563)
If you manage to set them up as mapped patches this might be possible with the mapped-function (see examples and the incomplete reference)

But why do you want to do this. I think the BC you describe is already in the built in functions (don't know the name)

Dear Bernhard,

Can 2-Way coupling of patches in groovy-bc be used to couple solid and fluid region such that used in http://openfoamwiki.net/index.php/Co...ing_of_patches?

Thanks

gschaider November 22, 2013 13:42

Quote:

Originally Posted by atoof (Post 462723)
Dear Bernhard,

Can 2-Way coupling of patches in groovy-bc be used to couple solid and fluid region such that used in http://openfoamwiki.net/index.php/Co...ing_of_patches?

Thanks

That can be done (syntax is a bit different but described on the swak-page). But that way only ONE uniform value can be passed from one patch to the other (not one value for every face)

ancolli July 29, 2017 09:01

Quote:

Originally Posted by atoof (Post 462723)
Dear Bernhard,

Can 2-Way coupling of patches in groovy-bc be used to couple solid and fluid region such that used in http://openfoamwiki.net/index.php/Co...ing_of_patches?

Thanks

Could u solve it with a value for every face from one patch to the other? Do u mind to share?

gschaider July 30, 2017 08:30

Quote:

Originally Posted by ancolli (Post 658806)
Could u solve it with a value for every face from one patch to the other? Do u mind to share?

For a coupled patch there is a function neighbourField that gives you the value on the "other" side. So "neighbourField(T)" should give you the T-field on the other side. Just not sure whether this will work with mult-region cases. Alternatively try "mapped(T)"

Sorry. No time to experiment. But that is what I found in the reference guide in the Documentation folder

ancolli July 31, 2017 04:33

Quote:

Originally Posted by gschaider (Post 658885)
For a coupled patch there is a function neighbourField that gives you the value on the "other" side. So "neighbourField(T)" should give you the T-field on the other side. Just not sure whether this will work with mult-region cases. Alternatively try "mapped(T)"

Sorry. No time to experiment. But that is what I found in the reference guide in the Documentation folder

thanks for ur time, I tried with both, but it seems that groovyBC can not reconise the field (I named them differently: Tsolid and Tfluid) in the second region without specifing it in the following way: {solid_to_fluid/solid}


All times are GMT -4. The time now is 13:17.