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/)
-   -   chtMultiRegionSimpleFoam with heat source not at boundary (https://www.cfd-online.com/Forums/openfoam-solving/126777-chtmultiregionsimplefoam-heat-source-not-boundary.html)

Antimony November 26, 2013 05:07

chtMultiRegionSimpleFoam with heat source not at boundary
 
Hi Foamers,

Just a quick question - I have noticed that the heat sources for the chtMultiRegionSimpleFoam tutorials are applied at the patches.

I followed the tutorial and tried a case where an object (a cube for example) is suspended in a fluid domain. When I tried to make the cube a heat source, I have not been able to (rather the solver does not seem to take it into account at all).

I have been looking through the threads in this forum but have not found anything that addresses this question. Anyone knows how to overcome this issue? Is this a limitation of the solver or am I missing something?

Any advise would be much appreciated.

Thanks very much!

Regards,

Antimony

Antimony November 28, 2013 02:21

heat source with compressible::turbulentTemperatureCoupledBaffleMix ed possible?
 
Hi All,

I do not know if my question was clear or not and so I thought I would rephrase and ask the question:

My problem is basically this: I have a solid box (called box) in a fluid domain (called domain0). How do I assign a heat flux any heat source on the surface separating the solid and the fluid regions? I need to understand the temperature distribution in both regions.

How do I assign a heat flux or a heat source to the baffle, especially to the compressible::turbulentTemperatureCoupledBaffleMix ed type?

Or can I use something like compressible::turbulentHeatFluxTemperature and specify a heat source?

Any ideas on this are much appreciated.

Thanks for your time!

Regards,

Antimony

tomf November 29, 2013 05:49

Hi Antimony,

I would not be sure about changing the boundary, it does not look like it is straightforward to do so. I think you could use the fvOptions framework to specify a heat source for the entire solid region (or part of it). The heattransfer from/to the fluid would than be done with the turbulentTemperatureCoupledBaffleMixed on the boundary.

Good luck,
Tom

Antimony November 29, 2013 06:42

Hi Tom,

Thanks very much for your reply! At least now I have some idea on how I should go about thinking this problem.

I had tried the turbulentHeatFluxTemperature method and specified the same flux on both sides. The results however were incorrect at the interface. Unfortunately at the interface, depending on whether you are at the solid side or the fluid side, the temperatures are different and the difference is substantial (>30K) for a heat source of say 500 W/m2 (just a test value). Whichever way you look at it, the temperature at the interface has to be one value right?

Couple of added questions though:
1. Based on what you have suggested, it would seem that even if I wanted to apply a heat flux I would probably have to convert it and put it in as a volume source right?

2. I am currently on OF 2.1.x. Unfortunately, at this moment, I cannot upgrade to release 2.2.x and consequently fvOptions isn't a choice for me, at least for now. Any suggestions how to apply constant volume source without using the fvOptions? I am guessing something like what is done in the damBreak example for interFoam, but I am not sure how to put in the volume source. Unless of course I have to tinker with the solver itself?

3. I was reading through some of the older posts as well, especially the ones from OF v 1.6. There they had something called solidWallHeatFluxTemperature and it seems like they were able to specify fluxes. From all the posts on that, it seems to be a very handy tool, which unfortunately they removed/replaced with the temperatureCoupledBaffle from OF v 2.0. Given that it was a very useful thing, I would think that they would have incorporated it somewhere in the new BC, no?

4. Finally, do you have any idea about what the refValue, refGradient and valueFraction actually do and how they should be input for turbulentTemperatureCoupledBaffleMixed? I tried looking into the source but I really cannot understand it. And if I specify only one of the parameters, the solver won't work because it needs all three as inputs. I thought of specifying temperature on one side and heat flux on the other just to see what happens, but because of the error, that could not be done.

Apologies for the long post.

Once again, thanks for your views. Really appreciate them.

Regards,

Antimony

tomf November 29, 2013 10:43

Hi,

I don't think I can help you on everything, but can at least try to answer your questions out of the top of my head:

1. Yes

2. Do not know this by heart, except for indeed modifying the solver

3. I do not know that particular boundary condition, so can not help you here.

4. From the tutorial (of22x) I see something like this for the boundary condition:

Code:

    heater_to_bottomAir
    {
        type            compressible::turbulentTemperatureCoupledBaffleMixed;
        value          uniform 300;
        neighbourFieldName T;
        kappa          solidThermo;
        kappaName      none;
    }

For of21x I see something similar, so I do not know why you would need any of "refValue, refGradient, valueFraction"? They are determined by the solver based on the input you give in the boundary condition. I think they refer to some code behind the mixed type boundary condition. So I do not think you should need to set any of these values.

Hope this helps,
regards,
Tom

Antimony December 1, 2013 22:58

Hi Tom,

Thanks very much once again for your replies! It will be very useful and once again gives me a direction to go in.

I will look into this based on what you have said.

Just to let you know: for the turbulentTemperatureCoupledBaffleMixed boundary condition, there seems to be the refValue, refGradient etc. I agree with you that they might be calculated by the solver itself, but was just curious if you or anyone else had any idea about those parameters.

Once again thanks very much and if I do manage to get something for this, will post back here.

Regards,

Antimony

Antimony January 1, 2014 21:27

Hi,

Happy New Year to you guys!

Just a quick question (and this refers back to an older post of mine on a similar topic: http://www.cfd-online.com/Forums/ope...-boundary.html) - Have either of you tried to prescribe a heat flux at the boundary?

I hope I am not spamming. I would just like to know if either of you have looked into this before and/or have any suggestions for the same.

Thanks very much!

Regards,

Antimony

[Moderator note: This post and the following 2 posts have been moved from this thread: http://www.cfd-online.com/Forums/ope...penfoam-2.html - Reason: to avoid getting an overlap of different conversations.]

skuznet January 2, 2014 13:19

Hi Antimony!

I'm prescribing fixed temperature now, but will need actually to prescribe a heat flux instead.
I'm not sure if it is possible to prescribe fixed flux directly in OF, but one can prescribe temperature gradient using fixedGradient.

Did you try to prescribe it already?

Sergey

Antimony January 3, 2014 03:01

Hi Sergey,

For some of the other problems that I was working on, I used compressible::turbulentHeatFluxTemperature because it allows you to choose between heat flux (W/m2) and heat source (W).

For the cht problem that I am working, I basically want to prescribe a heat flux on the interface between the solid and the fluid. Unfortunately, when I use the compressible::turbulentHeatFluxTemperature, there is a big discontinuity in the temperature of the interface depending on where it is measured.

One of the suggestions that I had gotten on this forum was that I use a volumetric heat source, but if I do, it would change the way the heat propagates through the solid.

As a result, I am currently stuck.

If you have any ideas, I would be happy to try them out. I am currently working with OF 2.1.x BTW

Regards,

Antimony

wyldckat January 5, 2014 09:07

Greetings to all!

@Antimony: I've moved the 3 posts above, because it was getting a bit confusing in the other thread - http://www.cfd-online.com/Forums/ope...-openfoam.html - and this seemed a better place to discuss this issue.

A few questions about your problem, very similar to the questions I had asked Sergey on the other thread:
  1. Do you have the turbulence modelling turned on? If so, which one?
  2. What is the mesh profile of your case, between wall and fluid? Is the mesh uniform or thinner closer to the wall?
  3. What is the contact area and the flow speed of the fluid?
  4. Do you have an analytical solution of this case, to base your conclusions on?
  5. Have you tried reproducing this issue with this example case: http://openfoamwiki.net/index.php/Ge..._-_planeWall2D - it's a good simpler case to manipulate/change and to try additional solutions and can more easily be shared. And best of all, there are analytical solutions for the "plane wall" scenario ;)
Best regards,
Bruno

Antimony January 5, 2014 22:50

1 Attachment(s)
Dear Bruno,

Thank you for your reply and for moving the posts to a better location!

Maybe I reply to your last question first? Think it will be better to start from there.

Yes, I have downloaded and tried the planeWall2D problem. In fact I used that as the case to understand how the chtMultiRegionSimpleFoam solver works, especially the regions part. Thank you very much for that! Has been very helpful. :)

Unfortunately though, the boundary conditions for that project are different from what I would want. :(

I have attached a snapshot of the type of geometry that I am using where there is a solid immersed in a fluid. As you can see the type of BC that I want on the interface is not the same as the planeWall2D tutorial. In fact, in the default tutorials in OF for chtMultiRegionSimpleFoam also, there isn't any example that uses heat flux, especially not on the interface and that is what I am chasing after.

I would be grateful for any pointers that you might have. Some of the earlier suggestions are to use a volumetric heat source. As far as possible, I do not want to do that because I am interested in knowing how the heat transfer through the solid happens.

To answer your other questions:
1. Yes I have included turbulence and have used the k-w SST model.
2. I created refinement regions around the solid and made the mesh there finer than the others.
3. The fluid is stationary. I understand that I cannot set the speed to zero, especially when using the ideal gas model for air and so I had set the internalField value to (0.01 0 0).
4. I haven't worked out an analytical solution for this.

Once again thanks very much for your advise and help! :)

Best Regards,

Antimony

micpage18 January 24, 2014 13:01

Hi Antimony,

I have a case similar at yours. Do you succeed to set a volumetric heat source?

Thank you,

wyldckat January 26, 2014 15:48

Greetings to all!

@Antimony: Sorry, I've been busy these past few weeks and had a long list of threads here on the forum that I wanted to answer to...

OK, I only managed to give a quick very read to your posts and I think that the boundary condition "externalWallHeatFluxTemperature" might be what you're looking for. Instructions on how to use it are in the comment part in the file revealed by this command:
Code:

echo $FOAM_SRC/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.H
When in doubt, have a look at the boundary conditions in display here: http://foam.sourceforge.net/docs/cpp/modules.html

The problem is that with this boundary condition, you cannot use a meshed region for the solid itself.

The other possibility is to rely on "fvOptions" for creating special cell-zone manipulations, such as those exemplified in the tutorial "heatTransfer/chtMultiRegionSimpleFoam/heatExchanger". You can find several examples by running:
Code:

find $FOAM_TUTORIALS -name "fvOptions"
Also browse through the "fvOptions" types available, listed at the folders indicated by the following commands:
Code:

echo $FOAM_SRC/fvOptions/constraints/
echo $FOAM_SRC/fvOptions/sources/

Best regards,
Bruno

kortak January 27, 2014 12:18

Hi,

I'am having the same kind of problem to solve, where I would like to simulate the solar energy heat flux on one wall surface. I am a novice on openfoam and will try very soon this kind of simulation...so I will get back on this thread if I have some good or bad results.

Cheers.

Vishsel August 28, 2019 08:11

Hi Antimony,

I know this thread was old one and sorry to restart this thread.

@antimony - I am also facing the same problem as yours.. But i hope now you have got the solution for this problem .. So please help me to move forward in this project..

Actually my need is to generate a heat source at surface (i.e @solid wall BC).

I have an input as heat flux value and i need clarification about which type have to use for my case, whether
1)scalarSemiImplicitSource (or)
2)externalWallHeatFluxTemperature in fvOptions

Thanks in advance,
Vishsel


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