CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Adding heat source to solid region in chtMultiRegionSimpleFoam - OF40 Extended!!!

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By peterhess
  • 1 Post By peterhess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2018, 19:55
Default Adding heat source to solid region in chtMultiRegionSimpleFoam - OF40 Extended!!!
  #1
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
Hello!

I started playing a bit with OF40 extended.

And I am facing a problem adding a heat source to a solid region solving using chtMultiRegionSimpleFoam.

The code I usually use in OF50 (not extended) defined in fvOptions looks like this:

heatSource
{
type scalarSemiImplicitSource;
active true;
selectionMode all;

scalarSemiImplicitSourceCoeffs
{
selectionMode cellZone;
cellZone SOLID;
volumeMode specific;//absolute;
injectionRateSuSp
{
h (50000 0);
}
}
}


Everything works fine!


Using the same fvOptions file has no effect in OF40 extended!

The solveSolid.H for OF50 looks like this:

fvScalarMatrix hEqn
(
(
thermo.isotropic()
? -fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
: -fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
)
==
fvOptions(rho, h)
);

hEqn.relax();

fvOptions.constrain(hEqn);

solvPerfh = hEqn.solve();

fvOptions.correct(h);


The solveSolid.H for OF40 looks like this:

fvScalarMatrix tEqn
(
-fvm::laplacian(Kappa, T)
);
tEqn.relax();
eqnResidual = tEqn.solve().initialResidual();
maxResidual = max(eqnResidual, maxResidual);



We can see that there is no fvOptions in the last one!


My question is how to add the heat source without changing/reprogramming/modifying the solver and recompile?

Do anybody knows why the fvOptions is missed here?


Regards

Peter
marcoberna23 likes this.
peterhess is offline   Reply With Quote

Old   August 23, 2018, 11:19
Default
  #2
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Quote:
Originally Posted by peterhess View Post
Hello!

I started playing a bit with OF40 extended.

And I am facing a problem adding a heat source to a solid region solving using chtMultiRegionSimpleFoam.

The code I usually use in OF50 (not extended) defined in fvOptions looks like this:

heatSource
{
type scalarSemiImplicitSource;
active true;
selectionMode all;

scalarSemiImplicitSourceCoeffs
{
selectionMode cellZone;
cellZone SOLID;
volumeMode specific;//absolute;
injectionRateSuSp
{
h (50000 0);
}
}
}


Everything works fine!


Using the same fvOptions file has no effect in OF40 extended!

The solveSolid.H for OF50 looks like this:

fvScalarMatrix hEqn
(
(
thermo.isotropic()
? -fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
: -fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
)
==
fvOptions(rho, h)
);

hEqn.relax();

fvOptions.constrain(hEqn);

solvPerfh = hEqn.solve();

fvOptions.correct(h);


The solveSolid.H for OF40 looks like this:

fvScalarMatrix tEqn
(
-fvm::laplacian(Kappa, T)
);
tEqn.relax();
eqnResidual = tEqn.solve().initialResidual();
maxResidual = max(eqnResidual, maxResidual);



We can see that there is no fvOptions in the last one!


My question is how to add the heat source without changing/reprogramming/modifying the solver and recompile?

Do anybody knows why the fvOptions is missed here?


Regards

Peter
Hello Peter,


I am doing a steady state simulation of conjugate heart transfer using chtMultiregionSimpleFOAM, using OF50 (not extended). I have multiple solid (unfortunately, i can not show entire geometry) in domain (blue in image) and fluid is moving across the solid (green in image). I am using fvOptions to define heat source in every solid.
Quote:
energySource
{
type scalarSemiImplicitSource;
active true;
selectionMode all;

scalarSemiImplicitSourceCoeffs
{
volumeMode specific;//
selectionMode all;
injectionRateSuSp
{
h (89878 0); // q in [W]; or in [W/m³] if you use specific mode (89878 0)
}
}
}

By using this heat source, the temperature kept on increasing (starting from 298 K exceeds 500K). The amount of heat source is correct because, the same heat source has been used in fluent and the maximum temp of solids reach up to 308K. I tried many things but could not figure out the mistake, I am making. May be you could help me to look in right direction.



Thank you
mwaqas is offline   Reply With Quote

Old   August 23, 2018, 11:20
Default
  #3
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
here is the image, I forgot to attach with the previous message
Attached Images
File Type: png 1.png (30.8 KB, 16 views)
mwaqas is offline   Reply With Quote

Old   August 23, 2018, 11:41
Default
  #4
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
Marhaba Mohammad,

Post the case please

regards

Peter
peterhess is offline   Reply With Quote

Old   August 23, 2018, 12:56
Default
  #5
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Hello Peterhess,


Thank you for your reply. Unfortunately, I can not post the case due to confidentiality. Also it is a big case having 1 Million cells. If you information regarding set-up, I could provide that.


Regards
Muhammad
mwaqas is offline   Reply With Quote

Old   August 23, 2018, 13:05
Default
  #6
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
Well then post the case without the mesh itself...

I need to see the setup.

I belive that you are using a fluent mesh and convert it to openFoam...

If yes, then You need to be sure that the dimensions of the two cases are identical...

Run checkMesh to find out which dimensions the case has!

If there is need then convert the dimensions using:

fluent3DMeshToFoam -scale FACTOR FLUENT_MESH

Anyway, the heat source should look like this:

heatSource
{
type scalarSemiImplicitSource;
active true;

scalarSemiImplicitSourceCoeffs
{
selectionMode cellZone;
cellZone yourZoneName;
volumeMode specific;//or absolute;
injectionRateSuSp
{
h (yourValue 0);
}
}
}
peterhess is offline   Reply With Quote

Old   August 23, 2018, 13:20
Default
  #7
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
I am using OF mesh. I used same mesh for transient simulation (chtMultiregionFoam) without any heat source and results are quite identical with Ansys. I think I am making mistake in selectionMode.



volumeMode specific;//
selectionMode all;
injectionRateSuSp
{
h (89878 0); // q in [W]; or in [W/m³] if you use specific mode (89878 0)
}


I didn't use topoSetDict to create cellZone. I just placed fvOtions in every solid folder with selectionMode all (no fvOption file in fluid folder). That is why, temperature of fluid also start increasing (alongwith solid) just after the inlet and kept on increasing in every iteration. Tomorrow, I will try by defining cellZone only for solid and will update here.


I have two more question.


If I define all solid regions in one single cellZone, then do I have to place fvOptions file in all solid's folder or only in one solid folder will be enough (I have 84 disconnected solid regions).


The unit of heat source (specific) is W/m^3 is right? I am little bit confuse with units because the units of enthalpy h are J/kg



Regards
mwaqas is offline   Reply With Quote

Old   August 23, 2018, 13:26
Default
  #8
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
see page 116!

https://upcommons.upc.edu/bitstream/...=2&isAllowed=y

specific --> W/m^3 !!!

I am not sure if multiple regions could be defined in one region, if they are physically not connected...

Anyway, this utility seams (not for sure) to do that. I have no idea if it works

https://openfoamwiki.net/index.php/MergeMeshes
mwaqas likes this.

Last edited by peterhess; August 23, 2018 at 16:10.
peterhess is offline   Reply With Quote

Old   August 23, 2018, 13:36
Default
  #9
Senior Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 122
Rep Power: 11
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Thank you for sharing the report. I will go through this. If you don't mind, could you please share your e-mail id. I will send you my case setup if I wont be able to resolve my problem.
mwaqas is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 09:07
variable Heat Source for Solid Region with UDF Alex90 Fluent UDF and Scheme Programming 3 February 24, 2015 11:24
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


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