|
[Sponsors] |
[swak4Foam] GroovyBC with power input (heat flux) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 9, 2015, 11:08 |
GroovyBC with power input (heat flux)
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi all,
I did not get the point to build a heat flux bc with groovy. Why I use groovy is due to the fact that I also have to use some gaussian probability distribution. At least I used this summary: http://www.modlab.lv/docs/2011/OpenF...Vilums_pdf.pdf So what we get is the following situation: f is the fractionExpression. Now I want to use the gradient expression to evaluate the temperature at the face. We get the following expression: This is exactly the same expression like in the turbulentHeatFluxTemperature BoundaryCondition. Now I expect, that the fractionExpression is zero. Therefore only the second term in the first eqn. is valid and we can write: This is equal to: and that is equal to: In groovyBC I used the following code: Code:
top { type groovyBC; variables "Kappa=160;Q=10000;g=Q/sum(mag(Sf()))/Kappa;"; fractionExpression "0"; gradientExpression "g"; value uniform 300; } Thanks in advance,
__________________
Keep foaming, Tobias Holzmann |
|
March 9, 2015, 12:31 |
|
#2 | |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
Hi Tobi!
Quote:
Code:
g=Q/mag(Sf())/Kappa Btw, is the same mag(Sf()) than area()? Or does area() take the sign of normal direction into account? Best regards, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
||
March 9, 2015, 14:43 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi Alex,
I need the whole area of the surface (not only one face). If I use yours, then the heatflux will increase extreamly (dividing by a very small number). That is not the problem.
__________________
Keep foaming, Tobias Holzmann |
|
March 9, 2015, 15:03 |
|
#4 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
Yes, you are right Tobi, sorry, I wrote that after a quick glance to the formulation without checking the calculation on paper. I got confused because recently I have been using groovyBC aswell but in my case it was for convection heat transfer not fixed power and I worked with heat fluxes instead of total heat. That's why understood wrong your formulation, I didn't remember any sum(...) below the fraction. After checking deeper your formulation, it seems to be ok... Have you managed to solve the problem with temperatures?
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
|
March 10, 2015, 03:57 |
|
#5 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
today it is working! I don't know what was the problem. The only thing that I changed today was to set the fractionExpression to zero but if I check the first post, I already did this yesterday. Don't know but its working proper now To your question ... area() - never used this option in groovy. Is it really a groovyBC function? It is definitly not the same as above.
__________________
Keep foaming, Tobias Holzmann |
|
January 12, 2016, 05:49 |
|
#6 | |
Senior Member
Join Date: May 2011
Posts: 231
Rep Power: 15 |
Dear Tobi,
I would like to use groovyBC in order to apply constant 400 kW/m^2 heat flux at the wall but I could not find how? can you help me? I am using OF version 2.3.1 Thanks! Quote:
|
||
January 12, 2016, 06:17 |
|
#7 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
I think you can use "turbulentlHeatTransferTemperature" for that. You can apply the flux [W/m^2]. There is no need for groovy. If you want to use groovy you have to derive the equation yourself / or just check the pdf in the first link. It shoud be sufficient.
__________________
Keep foaming, Tobias Holzmann |
|
January 12, 2016, 07:07 |
|
#8 |
Senior Member
Join Date: May 2011
Posts: 231
Rep Power: 15 |
thanks for the quick answer...yes you are right!I thought so as well but I have laminar flow so I do not have "alphaEff" so it gives me a problem
Code:
--> FOAM FATAL ERROR: request for volScalarField alphaEff from objectRegistry region0 failed available objects of type volScalarField are 24 ( alpha.water_0 cp alpha.vapour interfaceProperties:K pSat alpha.water mCond kappa rho mVap p_rgh nu gh nu1 ((hEvap*(mCond+mVap))|T) IF p rho_0 nu2 T rhoCp_0 (-IF*SLarge) rhoCp ((IF*SLarge)*TSat) ) From function objectRegistry::lookupObject<Type>(const word&) const in file /usr/local/OpenFOAM//OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/usr/local/OpenFOAM//OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/usr/local/OpenFOAM//OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/links/rek209/OpenFOAM/rek209-2.3.1/platforms/linux64GccDPOpt/lib/libphaseChangeTwoPhaseMixturesInterEvapCondPhaseChangeFoam.so" #3 Foam::incompressible::turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs() in "/usr/local/OpenFOAM//OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libincompressibleTurbulenceModel.so" #4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::updateCoeffs() at /usr/local/OpenFOAM//OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/PtrListI.H:36 #5 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at /usr/local/OpenFOAM//OpenFOAM-2.3.1/src/finiteVolume/lnInclude/fvMatrix.C:325 #6 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::Sp<double>(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at /usr/local/OpenFOAM//OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/tmpI.H:191 #7 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::Sp<double>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at /usr/local/OpenFOAM//OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/tmpI.H:176 #8 at /scratch/rkahraman/evapCond/interEvapCondPhaseChangeFoam_allfiles/interExCondPhaseChangeFoam/TEqn.H:36 #9 __libc_start_main in "/lib64/libc.so.6" #10 in "/home/links/rek209/OpenFOAM/rek209-2.3.1/platforms/linux64GccDPOpt/bin/interExCondPhaseChangeFoam" Aborted |
|
January 12, 2016, 07:15 |
|
#9 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
it seems that its your own solver. Do you have a field implemented that correspond to "thermal diffusivity"? If yes then use that, otherwise implement it to your solver or change the BC or if you want, use groovy.
__________________
Keep foaming, Tobias Holzmann |
|
January 12, 2016, 09:37 |
|
#10 |
Senior Member
Join Date: May 2011
Posts: 231
Rep Power: 15 |
Thanks again...the problem is I know only the thermal conductivity and heat flux, so I can not implement groovyBC...do you have any idea how i can build the groovyBC in order to have fix heat flux?
BEST! |
|
January 12, 2016, 10:04 |
|
#11 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
I don't know what your application is for and what you actually want to do but if I understand it correct you can use the groovy in the first post:
__________________
Keep foaming, Tobias Holzmann |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conjugate Heat Transfer: Wall Heat Flux at Coupled Walls? | MaxHeat | FLUENT | 4 | September 14, 2017 10:44 |
Forced convective heat transfere with fixed heat flux? | BenFranklinIII | OpenFOAM Running, Solving & CFD | 0 | July 30, 2015 05:31 |
[OpenFOAM] Paraview 3.98 - errors when saving geometry file | pajot | ParaView | 1 | September 28, 2013 10:45 |
Heat Flux Profile at Fluid-Porous Interface | Hitch8 | CFX | 4 | December 15, 2012 09:57 |
groovyBC nonuniform Wall heat flux | Shoonya | Main CFD Forum | 0 | August 11, 2010 13:03 |