|
[Sponsors] |
error when calculating values at boundary using refCast |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 24, 2009, 08:05 |
error when calculating values at boundary using refCast
|
#1 |
New Member
Praveen
Join Date: Mar 2009
Location: Goteborg, Sweden
Posts: 8
Rep Power: 17 |
I am currently facing problems when calculating heat transfer values at boundary which is used for flux boundary condition.
I am fixing the heat transfer co-efficient in cells based on the value of temperature. When doing this the values are fixed in the cells but the values at the boundary are zero. I made some changes as label patchI = mesh.boundaryMesh().findPatchID("leftmovingwall"); zeroGradientFvPatchScalarField& bufferh = refCast<zeroGradientFvPatchScalarField>(hT.boundar yField()[patchI]); forAll (bufferh, faceI) { if (T.boundaryField()[patchI][faceI] < Tmin_hT.value()) { bufferh[faceI] = hT_Tmin.value(); } else if (T.boundaryField()[patchI][faceI] >= Tmin_hT.value()) { bufferh[faceI] = hT_Tmax.value(); } } The compilation of code did not produce any error but when i start the simulation i get the following error : Attempt to cast type calculated to type zeroGradient#0 Foam::error:rintStack(Foam::Ostream&) in "/apps/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::error::abort() in "/apps/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #2 main in "/home/prabhu/OpenFOAM/prabhu-1.5/applications/bin/linux64GccDPOpt/lasersolid" #3 __libc_start_main in "/lib64/libc.so.6" #4 Foam::regIOobject::readIfModified() in "/home/prabhu/OpenFOAM/prabhu-1.5/applications/bin/linux64GccDPOpt/lasersolid" From function refCast<To>(From&) in file /apps/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/typeInfo.H at line 106. FOAM aborting Abort Could any1 tell me how can this problem be solved? |
|
April 3, 2011, 22:23 |
|
#2 |
New Member
Gideon Balloch
Join Date: Apr 2011
Posts: 1
Rep Power: 0 |
Hi, I'm having a similar problem with chtMultiRegionFoam, where I get the following error:
--> FOAM FATAL ERROR: Attempt to cast type calculated to type compressible::turbulentTemperatureCoupledBaffle From function refCast<To>(From&) in file /home/gballoch/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/typeInfo.H at line 114. FOAM aborting I know you posted here a long time ago but I was wondering if you resolved what the problem was? I think it is probably an inconsistency in BC's, but I've double checked all of them and they appear to be fine! |
|
April 12, 2011, 10:22 |
|
#3 |
Senior Member
Join Date: Mar 2011
Posts: 158
Rep Power: 15 |
I do have the same problem.
But I still have solved one case with exactly the same settings with one exeption. In the first case, which solved with the same settings, there was only one solid and one fluid. Now the problem appears with two solids and one fluid. As I said I have used exactly the same settings for the T files. Does someone know how to solve this problem? Best Regards, tH3f0rC3 |
|
April 14, 2011, 03:32 |
|
#4 |
Senior Member
Join Date: Mar 2011
Posts: 158
Rep Power: 15 |
Hi,
I know now that the simulation works with the following setting: Galvano { type compressible::turbulentTemperatureCoupledBaffleMix ed; value $internalField; neighbourFieldName T; K K; } Geo2 { type fixed value; value uniform 573; } But I want to do it like this: Galvano { type compressible::turbulentTemperatureCoupledBaffleMix ed; value $internalField; neighbourFieldName T; K K; } Geo2 { type compressible::turbulentTemperatureCoupledBaffleMix ed; value $internalField; neighbourFieldName T; K K; } But than I recieve the following error message: --> FOAM FATAL ERROR: Attempt to cast type zeroGradient to type compressible::turbulentTemperatureCoupledBaffleMix ed From function refCast<To>(From&) in file /local/OpenFOAM/src/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/typeInfo.H at line 114. FOAM aborting Does someone know where the mistake is? Best Regards, tH3f0rC3 Last edited by tH3f0rC3; April 14, 2011 at 10:12. |
|
April 15, 2011, 09:46 |
|
#5 |
Senior Member
Join Date: Mar 2011
Posts: 158
Rep Power: 15 |
I still have tried to set up the neighbourFieldName T; to another variable, but the solver needs the T here.
It's also the same with K K;. I still think that I have to use different entries here, but I'm not sure. Best Ragards, tH3f0rC3 |
|
April 18, 2011, 04:49 |
|
#6 |
Senior Member
Join Date: Mar 2011
Posts: 158
Rep Power: 15 |
I have now solved the problem.
By using value uniform 573.15; //value $internalField; in * { type compressible::turbulentTemperatureCoupledBaffleMix ed; value uniform 573.15; //value $internalField; neighbourFieldName T; K K; } the solver is running. It's very strange. The solver runs good with only one solid and one fluid with the value $internalField. But with two solids the solver only runs with value uniform 573,15. Best Regards, tH3f0rC3 |
|
June 29, 2012, 04:48 |
Attempt to cast type zeroGradient to type compressible::turbulentTemperatureCoupledBa
|
#7 | |
New Member
yossi
Join Date: Nov 2010
Posts: 8
Rep Power: 16 |
Quote:
I've had the same problem. It seemed that the b.c at the fluid was fine, but the b.c. at the solid was "zeroGradient" |
||
March 12, 2018, 09:31 |
|
#8 | |
Senior Member
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12 |
Quote:
Solved, I forgot to run changeDictionary for the new solid... Last edited by ancolli; March 12, 2018 at 10:32. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |
Errno 24 linux | ivanwhlau | OpenFOAM Running, Solving & CFD | 6 | July 1, 2009 11:16 |
calculating mass flow rate from exported velocity values | Sasha | FLUENT | 0 | April 6, 2009 17:07 |
How to initialise values for two inlet boundary comndition | 21kalee | OpenFOAM Running, Solving & CFD | 0 | December 26, 2007 05:40 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |