CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] Heat Flux boundary conditions with groovyBC for chtMultiRegionFoam with solids only (https://www.cfd-online.com/Forums/openfoam-community-contributions/134661-heat-flux-boundary-conditions-groovybc-chtmultiregionfoam-solids-only.html)

Kumudu May 2, 2014 02:58

Heat Flux boundary conditions with groovyBC for chtMultiRegionFoam with solids only
 
Dear Bruno,

Your advice really helped in my thesis, and now I have another question. I have used funkysetfields to define non uniform initial temperature for solid region (soil) in my problem. However, I want to ask you that, can we define non uniform constant heat flux boundary conditions using groovy at the solid - solid interface.

The problem with fluid is, I cannot run the simulation for longer time, as the time steps should be too small, unless otherwise it create problem with courant number. Therefore, here are my questions....

1. can we use, chtMultiRegionFoam only to solve heat conduction equation for solid-solid (no fluid region )?. Will it give error,if I keep bracket empty in the regionProperties as follows,


fluidRegionNames ( );
solidRegionNames ( Solid1 Solid2 );


2. And impose non-uniform heat flux boundary condition at the pipe inner surface to give the effect of fluid circulation in the pipe. How can I do it, if possible using groovy or any other easy way?.


I am thinking that leave the fluid region as a empty volume (a hole) and other solid regions are defined as previously. Only at the inner surface wall, impose the heat flux.

Could you please let me know about this.

Best regards,
Kumudu

wyldckat May 3, 2014 09:29

Hi Kumudu,

I've moved your question to a new thread, as it is considerably different from the other thread: http://www.cfd-online.com/Forums/ope...egionfoam.html

I have never tried to do what you're asking about, therefore I ask you to set-up an example case of what you're trying to do and share it with us.

Best regards,
Bruno

Kumudu May 3, 2014 11:07

Quote:

Originally Posted by wyldckat (Post 489603)
Hi Kumudu,

I've moved your question to a new thread, as it is considerably different from the other thread: http://www.cfd-online.com/Forums/ope...egionfoam.html

I have never tried to do what you're asking about, therefore I ask you to set-up an example case of what you're trying to do and share it with us.

Best regards,
Bruno

Dear Bruno,

Thanks for the reply. I haven't tried that it yet. I thought it could be possible. As I see in the chtMultiRegionFoam, the fluid and the solid are solved separate. Therefore, I thought setting the fluidRegionNames ( ) empty will not matter.

Will it be?

secondly,for heat flux: at the interface between hole (previously water) and the pipe I hope to use the groovy as follows,

1. Use the faceSet to name the faces of the hole as "waterPipe".
2. Define the boundary conditions as follows,

T
{
internalField uniform 273;

boundaryField
{

waterPipe
{
type groovyBC;
variables "q0=50;alpha=0.05;"
gradientExpression "(q0*exp((pos().z)*(pos().z))/(4*alpha*time()";
value $internalField;
}

}

}

Is it correct?

If you think I can't use chtMultiRegionFoam, can I use LaplacianFoam and use the toposet to define the regions as I did in the chtMultiRegion and give the boundary condition with the help of groovy?.


Thank you Bruno,
Best regards,
Kumudu

wyldckat May 3, 2014 16:14

Hi Kumudu,

laplacianFoam doesn't work with multiple regions. At least not without some considerable additional coding.

I don't have the time to test this myself, therefore I don't know the answer. Which is why I asked you to share a simple case. It's possible that chtMultiRegionFoam may work with solid regions only, but I simply don't know, because I have never tried it and I don't remember reading about it on the forum :(.
Then again, I very vaguely remember reading something about someone trying to do it, but I can't remember if they succeeded or not.

As for the groovyBC, you're missing at least one parenthesis at the end of the "gradientExpression" line. Again, I'm not experienced enough with it to know right away if it works or not.

Best regards,
Bruno

PS: Please use the "[CODE]" markers, as explained in one of the links in my signature: Posting code and output with [CODE]

cliffdub August 22, 2014 11:26

Hello Kumudu,

I have great appreciation for your two-solid problem, as that is a test case that I am trying to use to teach myself. Did you have any success with chtMultiRegionFoam or setting up a multiRegion Laplacian?

http://www.cfd-online.com/Forums/ope...wo-solids.html

Yes, I'm still learning.

Cliff

Kumudu August 23, 2014 08:49

Quote:

Originally Posted by cliffdub (Post 507336)
Hello Kumudu,

I have great appreciation for your two-solid problem, as that is a test case that I am trying to use to teach myself. Did you have any success with chtMultiRegionFoam or setting up a multiRegion Laplacian?

http://www.cfd-online.com/Forums/ope...wo-solids.html

Yes, I'm still learning.

Cliff

Hi Cliff,

I just saw your massage. I am sorry to say that I used the chtMultiRegion as it is and didn't make any modification.

Best,
Kumudu

cliffdub August 23, 2014 12:20

Hi Kumudu,

You were able to solve multiple regions of solid only with chtMultiRegion? Is there an possibility that you could have a look at my two-solid heat transfer case and see where I have gone wrong?

https://www.dropbox.com/sh/1fxb42g1b...onJS_92kKyZgha

I currently do not have any fluids in the region properties.

Thank you many times for any time spent,

Cliff

Kumudu August 23, 2014 14:33

Quote:

Originally Posted by cliffdub (Post 507449)
Hi Kumudu,

You were able to solve multiple regions of solid only with chtMultiRegion? Is there an possibility that you could have a look at my two-solid heat transfer case and see where I have gone wrong?

https://www.dropbox.com/sh/1fxb42g1b...onJS_92kKyZgha

I currently do not have any fluids in the region properties.

Thank you many times for any time spent,

Cliff

Hi Cliff,

In my problem I had fluid, however, in the beginning I was trying to consider applying heat flux boundary conditions only at the places where I need to consider there is fluid. Anyway, chtMultiRegion can handle the solid-solid heat transfer and you do not have to do anything regarding that. Because, mine had solid-solid, and solid-fluid interfaces and I gave the following conditions at the interfaces, and I am not sure will it work without fluid. I think chtMultiRegion should work without fluid.

"solid1_to_solid2"
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K solidThermo;
KName none;
value $internalField;
}
Best,
Kumudu


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