|
[Sponsors] |
September 3, 2012, 06:45 |
Error: Invalid Initialization
|
#1 |
New Member
Join Date: Jul 2012
Posts: 11
Rep Power: 14 |
Hi,
I have a mesh with multiple regions and need to solve different chemical reactions in different fluid regions. Therefore I would like to modify the chtMultiRegionFoam solver in a way that it solves chemical reactions in fluid regions. I got the following error during the compilation: In file included from rhoPorousMultiRegionReactingFoam.C:107:0: fluid/setRegionFluidFields.H:6:65: error: invalid initialization of reference of type ‘Foam:imensionedField<double, Foam::volMesh>&’ from expression of type ‘double’ make: *** [Make/linux64GccDPOpt/rhoPorousMultiRegionReactingFoam.o] Error 1 In my createFluidFields.H I have for chemistrySh: PtrList<DimensionedField<scalar, volMesh> > chemistrySh(fluidRegions.size()); forAll(fluidRegions, i) { ... chemistrySh.set ( i, new DimensionedField<scalar, volMesh> ( IOobject ( "chemistry::Sh", runTime.timeName(), fluidRegions[i], IOobject::NO_READ, IOobject::NO_WRITE ), fluidRegions[i], dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0) ) ); ... } In my setRegionFluidFields.H I added this line that seems to be wrong: DimensionedField<scalar, volMesh>& chemistrySh = chemistrySh[i]; Can anybody help me to overcome this problem? Thanks in advance for any suggestions, Matari |
|
September 3, 2012, 10:12 |
|
#2 |
New Member
Join Date: Jul 2012
Posts: 11
Rep Power: 14 |
Hi again,
I modified the line in my setRegionFluidFields.H: DimensionedField<scalar, volMesh>& chem = chemistrySh[i]; Now it compiles without errors. |
|
November 14, 2012, 01:48 |
|
#3 |
Member
Join Date: Nov 2010
Location: Tokyo / Japan
Posts: 40
Rep Power: 15 |
Hey Matari,
I also currently work on different chemical reactions for different regions. I am still wondering if I should use the chtMultiRegionFoam because I am not interested in fluid-solid but only fluid-fluid coupling. I simply need the multi region feature. Let's assume one has two fluid zones with different reactions. How do you define the interface boundaries between the regions for the species? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FMG initialization query | Mohsin | FLUENT | 6 | November 2, 2016 03:02 |
Initialization problem when using Axisymmetry BC | Eduardo | FLUENT | 0 | August 4, 2008 10:23 |
Initialization | a student | Siemens | 2 | May 19, 2006 13:55 |
compressor initialization | paglia | FLUENT | 0 | February 1, 2006 16:14 |
Mesh Initialization | shakked | Main CFD Forum | 2 | August 7, 2004 23:50 |