|
[Sponsors] |
How I can introduce my power heat (W) in chtMultiRegionFoam? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 19, 2015, 12:24 |
|
#21 |
New Member
Lukasz
Join Date: Apr 2012
Posts: 10
Rep Power: 14 |
Hi all,
I had identical problem. The fvOption for solid body does not work in openFoam 2.3.x. I have switched to 2.4 and now everything works fine. cheers LK |
|
July 11, 2016, 10:53 |
|
#22 |
Member
Bruno
Join Date: Jun 2016
Location: Siegen, Germany
Posts: 59
Rep Power: 10 |
Hey aminem (or anyone else! I'm not picky), any chance you're reading this and could reupload your case? I've tried following fvOptions tutorials but they all concern masssources or rotation, I can't seem to find heat source examples.
I'm trying to add a heat source in W to the chtMultiRegionFoam/multiRegionHeater tutorial, but I can't entirely figure out how the fvOptions works. It works fine without fvOptions. It is based on that tutorial, but in stead of the T shaped heater it is just the horizontal part, submerged in air, hence without the two solid regions and the water. I am running OpenFOAM 4.0. I added the following fvOptions file to system/heater (that's where it should be right? not in the main system folder?): Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // heatSource { type scalarSemiImplicitSource; active true; selectionMode cellZone; cellZone heater; scalarSemiImplicitSourceCoeffs { volumeMode absolute; injectionRateSuSp { h (200 0); } } } // ************************************************************************* // Code:
[3] --> FOAM FATAL IO ERROR: [3] keyword selectionMode is undefined in dictionary "IOstream.heatSource.scalarSemiImplicitSourceCoeffs" Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 4.0-665f1db4c1f1 Exec : chtMultiRegionFoam -parallel Date : Jul 11 2016 Time : 15:39:09 Host : "bruno-VirtualBox" PID : 8759 Case : /home/bruno/OpenFOAM/bruno-4.0/run/chtMultiRegionFoam/multiRegionHeater2 nProcs : 4 Slaves : 3 ( "bruno-VirtualBox.8760" "bruno-VirtualBox.8761" "bruno-VirtualBox.8762" ) Pstream initialized with: floatTransfer : 0 nProcsSimpleSum : 0 commsType : nonBlocking polling iterations : 0 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create fluid mesh for region topAir for time = 0 Create solid mesh for region heater for time = 0 *** Reading fluid mesh thermophysical properties for region topAir Adding to thermoFluid Selecting thermodynamics package { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } Adding to rhoFluid Adding to UFluid Adding to phiFluid Adding to gFluid Adding to hRefFluid Adding to ghFluid Adding to ghfFluid Adding to turbulence Selecting turbulence model type laminar Selecting radiationModel none Adding to KFluid Adding to dpdtFluid Adding MRF No MRF models present Adding fvOptions No finite volume options present *** Reading solid mesh thermophysical properties for region heater Adding to thermos Selecting thermodynamics package { type heSolidThermo; mixture pureMixture; transport constIso; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleEnthalpy; } [3] [3] [3] --> FOAM FATAL IO ERROR: [3] keyword selectionMode is undefined in dictionary "IOstream.heatSource.scalarSemiImplicitSourceCoeffs" [3] [3] file: IOstream.heatSource.scalarSemiImplicitSourceCoeffs from line 0 to line 0. [3] [3] From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const [3] in file db/dictionary/dictionary.C at line 441. [3] FOAM parallel run exiting [3] [0] [0] [0] --> FOAM FATAL IO ERROR: [0] keyword selectionMode is undefined in dictionary "/home/bruno/OpenFOAM/bruno-4.0/run/chtMultiRegionFoam/multiRegionHeater2/system/heater/fvOptions.heatSource.scalarSemiImplicitSourceCoeffs" [0] [0] file: /home/bruno/OpenFOAM/bruno-4.0/run/chtMultiRegionFoam/multiRegionHeater2/system/heater/fvOptions.heatSource.scalarSemiImplicitSourceCoeffs from line 25 to line 28. [0] [0] From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const [0] in file db/dictionary/dictionary.C at line 441. [0] FOAM parallel run exiting [0] [1] [1] [1] --> FOAM FATAL IO ERROR: [1] keyword selectionMode is undefined in dictionary "IOstream.heatSource.scalarSemiImplicitSourceCoeffs" [1] [1] file: IOstream.heatSource.scalarSemiImplicitSourceCoeffs from line 0 to line 0. [1] [1] From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const [1] in file db/dictionary/dictionary.C at line 441. [1] FOAM parallel run exiting [1] [2] [2] [2] --> FOAM FATAL IO ERROR: [2] keyword selectionMode is undefined in dictionary "IOstream.heatSource.scalarSemiImplicitSourceCoeffs" [2] [2] file: IOstream.heatSource.scalarSemiImplicitSourceCoeffs from line 0 to line 0. [2] [2] From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const [2] in file db/dictionary/dictionary.C at line 441. [2] FOAM parallel run exiting [2] Adding to radiations Selecting radiationModel opaqueSolid Selecting absorptionEmissionModel constantAbsorptionEmission Selecting scatterModel none Selecting sootModel none Adding fvOptions Creating finite volume options from "system/fvOptions" Selecting finite volume options model type scalarSemiImplicitSource Source: heatSource -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode 1. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. -------------------------------------------------------------------------- [bruno-VirtualBox:08757] 3 more processes have sent help message help-mpi-api.txt / mpi-abort [bruno-VirtualBox:08757] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( // Heater { name heaterCellSet; type cellSet; action new; source boxToCell; sourceInfo { box (-0.01 0 -0.05 )(0.01 0.01 0.05); } } // { // name heaterCellSet; // type cellSet; // action add; // source boxToCell; // sourceInfo // { // box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001); // } // } { name heater; type cellZoneSet; action new; source setToCellZone; sourceInfo { set heaterCellSet; } } // topAir { name topAirCellSet; type cellSet; action new; source cellToCell; sourceInfo { set heaterCellSet; } } { name topAirCellSet; type cellSet; action invert; } { name topAir; type cellZoneSet; action new; source setToCellZone; sourceInfo { set topAirCellSet; } } ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) Gauss upwind; div(phi,K) Gauss linear; div(phi,h) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { h { solver PCG; preconditioner DIC; tolerance 1e-06; relTol 0.1; } hFinal { $h; tolerance 1e-06; relTol 0; } } PIMPLE { nNonOrthogonalCorrectors 0; } // ************************************************************************* // *edit* Read HERE that perhaps the fvOptions file should be moved to the constant folder in stead of system folder since OF3.0, but that doesn't work. |
|
July 11, 2016, 17:49 |
|
#23 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Hi, quick answer since I'm on the phone. If you put the fvOptions within the system/heater directory you should define volumeMode to "all" since you are defining the generating region within the region itself and I guess you want all the cells belonging the region to be generating power, right?
You can check out my web site where I discuss and explain similar cases to yours that are very simple. There you can see what I mean. Hope it helps Cheers, 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! |
|
July 12, 2016, 04:45 |
|
#24 | |
Member
Bruno
Join Date: Jun 2016
Location: Siegen, Germany
Posts: 59
Rep Power: 10 |
Quote:
I'm still stuck however. When keeping the fvOptions file in the system/heater folder I have the exact same error (the keyword selectionMode being undefined), even when setting selectionMode to all. If I put the fvOptions file in the system directory, it seems to get ignored, as all I see in the log is: Code:
Adding fvOptions No finite volume options present Any clue what might be going wrong_ Cheers! |
||
July 12, 2016, 06:03 |
|
#25 |
Member
Bruno
Join Date: Jun 2016
Location: Siegen, Germany
Posts: 59
Rep Power: 10 |
Update; Just tried the exact same case in OpenFOAM 2.4.0 (instead of OpenFOAM 4.0), here it seems to work.. Guess the way fvOptions works changed? It had nothing to do with running serial or parallel either.
Still interested to dig around in the changelog of OF4.0 though, as I'd rather stay in one OF version for all my cases. Thanks Alex! Input still welcome. |
|
July 14, 2016, 12:28 |
|
#26 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Hi Bruno,
I just had a very quick glance to the source code of the fvOptions framework for OF 4.x and I think it suffered some little changes in the manner it has to be specified. Check the description in the source code, there you can see that the control parameters now need to be defined within a subdictionary called scalarExplicitSourceCoeffs (you can also see it below) Code:
scalarExplicitSourceCoeffs { timeStart 0.0; // Start time duration 1000.0; // Duration selectionMode cellSet; // cellSet, points, cellZone . . . } Cheers, 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! |
|
July 15, 2016, 06:17 |
|
#27 |
Senior Member
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13 |
This change in syntax came in version 3.0
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET |
|
July 15, 2016, 08:49 |
|
#28 |
Member
Bruno
Join Date: Jun 2016
Location: Siegen, Germany
Posts: 59
Rep Power: 10 |
Thanks Alex and Derek!
Literally just a matter of putting the selectionMode in the Coeffs bracket, hence the correct way for me was (in stead of what you can see a couple posts up from here): Code:
heatSource { type scalarSemiImplicitSource; active true; scalarSemiImplicitSourceCoeffs { volumeMode absolute; selectionMode all; injectionRateSuSp { h (200 0); } } } |
|
July 15, 2016, 09:57 |
|
#29 |
Senior Member
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13 |
watch out for other changes as well
http://www.cfd-online.com/Forums/ope...ng-v3-0-a.html
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET |
|
April 25, 2019, 09:01 |
|
#30 | |
Member
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 7 |
Hello Derekm,
I have a doubt about this reply of yours: Quote:
How did u know that with 'h (10 0)' and Code:
- selected 176 cell(s) with volume 2.786796e-06 I mean how can we deduce the power from this line? Also how can we calculate that, to obtain a power of certain value say 1.5W in this case we need a number like 5E5 or something? In short, my question is, which is the equation by which we can calculate the value of 'h' that we must put if we need to generate the heat source of some certain power value. |
||
August 19, 2019, 17:47 |
|
#31 | |
Senior Member
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7 |
Quote:
I have a question here, I am using fvOption to generate a heat source. The region in which I am putting fvOptions has the dimensions (0.05m x 0.05m x0.05m). its a square block. And I am putting 5W of power. I am using specific mode and in fvOptions I am putting value = Power/volume of region. Now, I want to check that after putting this power, what would be the temperature of my region? But I don't know which mathematical relation to use for that? When I RUN the solver, the temperature of the region is continuously increasing, and it is not getting stable. And one more thing I need to ask is that, the power that we put inside the region, is it power dissipation of that object? I shall be very thankful, if you can help me out in this. Thank you |
||
August 19, 2019, 18:26 |
|
#32 | |
Senior Member
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13 |
The value of h in volume mode is watts per cubic metre
Quote:
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET |
||
August 29, 2019, 03:23 |
|
#33 |
Member
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 7 |
Hi FOAMers,
May i know fvSolution and fvSchemes file for porous media with heat source at surface of the wall ?? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
chtMultiRegionFoam connection between solid and fluid region of heat exchanger | ahab | OpenFOAM | 1 | December 18, 2019 01:37 |
dieselFoam problem!! trying to introduce a new heat transfer model | vivek070176 | OpenFOAM Programming & Development | 10 | December 24, 2014 00:48 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |
Problem of heat balance in Coal Boiler simulation | DG | FLUENT | 9 | December 25, 2008 21:57 |
Concentric tube heat exchanger (Air-Water) | Young | CFX | 5 | October 7, 2008 00:17 |