|
[Sponsors] |
August 3, 2012, 11:38 |
directionalKSolidThermo syntax
|
#1 |
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 14 |
Hello,
I'm trying to create an orthotropic material, with an orthotropic conductivity. So, i try to use the directionalKSolidThermo function with this syntax : Code:
directionalKSolidThermoCoeffs { //- does interpolation and directional K in coordinate system. // Specify multiple values, one for each temperature. Properties are // interpolated according to the local temperature. //- thermo properties TValues (100 1000); rhoValues (1700 1700); cpValues (1700 1700); KValues ((10 10 1) (10 10 1)); coordinateSystem { origin (0 0 0); coordinateRotation { type axes; e1 (1 0 0); e2 (0 1 0); e3 (0 0 1); } } //- chemical properties HfValues (0 0); //- radiation properties emissivityValues (0.95 0.95); kappaValues (0 0); sigmaSValues (0 0); } That's the error : Code:
--> FOAM FATAL ERROR: Not implemented From function directionalKSolidThermo::K(const label) const in file directionalKSolidThermo/directionalKSolidThermo.H at line 134. FOAM aborting Thank you for any hint. Excuse my english Best Regards, m_f |
|
August 10, 2012, 09:45 |
|
#2 |
New Member
Nikola
Join Date: Oct 2011
Posts: 4
Rep Power: 15 |
I am facing with the same problem.
Did you find any solution? Thanks. |
|
August 10, 2012, 14:44 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
What version of OpenFOAM are you using? And can you attach an example case? This way it'll be easier for people here at the forum to help you! Best regards, Bruno
__________________
|
|
August 10, 2012, 17:35 |
|
#4 |
New Member
Nikola
Join Date: Oct 2011
Posts: 4
Rep Power: 15 |
Hi Wyldckat,
I am using openfoam211. I have problem to attached this file but this file can be find following the next path in openfoam211: tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties. I changed feature "thermoType constSolidThermo" to "thermoType directionalKSolidThermo" which was already inside. If this feature is not technically implemented yet could you tell me how I can model directional conductivity in solid. For instance, K=0 in x-direction, K=17 in y-direction and K=17 in z-direction? Thank you in advance. Regards, Nikola |
|
August 10, 2012, 19:39 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Nikola,
I'm stumped... apparently this feature is broken! It was sort-of fixed here: http://www.openfoam.org/mantisbt/view.php?id=438 But technically it only delegates the problem down the line... but I can't understand if there is any derived class that reimplements this method I've checked OpenFOAM 2.1.0, 2.0.x, 1.7.x and even the variant 1.6-ext, and it doesn't look like it will work in either one of the them... actually, in 1.7.x and 1.6-ext, this case isn't even implemented in the same way I guess I'm only able to suggest the thing you where earlier thinking: this is a bug! But this should be reported here: http://www.openfoam.org/mantisbt/my_view_page.php Please describe there the same steps you've described here. Best regards and good luck! Bruno
__________________
|
|
August 11, 2012, 10:14 |
|
#6 | |
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 14 |
Hello,
As MarkWithag : Quote:
The bug was reported by MarkWithag. Please follow this link : http://www.openfoam.org/mantisbt/view.php?id=622 Best regards. Have a good week-end. m_f |
||
August 15, 2012, 03:54 |
|
#7 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
I think I know what the problem is.
you are trying to access a scalar-valued K, which is not defined for the tensor approach. If you go to the code applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H you will see that K is defined as a scalar tmp<volScalarField> tkappa = thermo.K(); const volScalarField& kappa = tkappa(); //tmp<volSymmTensorField> tkappa = thermo.directionalK(); //const volSymmTensorField& kappa = tkappa(); if you uncomment the tensor-part and comment the scalar part and recompile the code and try to run your case what will happen then. N |
|
August 15, 2012, 06:23 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Niklas,
I was curious and tried this myself. The same error message came out Here's a more complete output: Code:
Region: bottomAir Courant Number mean: 0.002118344 max: 0.003438382 Region: topAir Courant Number mean: 0.02267985 max: 0.03164373 Region: heater Diffusion Number mean: 2.495128e-06 max: 3.140529e-06 Region: leftSolid Diffusion Number mean: 2.499425e-06 max: 3.038856e-06 Region: rightSolid Diffusion Number mean: 2.499393e-06 max: 3.040031e-06 deltaT = 0.009475679 Region: bottomAir Courant Number mean: 0.02007275 max: 0.032581 Region: topAir Courant Number mean: 0.214907 max: 0.2998459 Region: heater Diffusion Number mean: 2.364303e-05 max: 2.975865e-05 Region: leftSolid Diffusion Number mean: 2.368375e-05 max: 2.879523e-05 Region: rightSolid Diffusion Number mean: 2.368345e-05 max: 2.880636e-05 deltaT = 0.009475679 Time = 0.00947568 Solving for fluid region bottomAir diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 5.185517e-10, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 8.709587e-11, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 5.069313e-10, No Iterations 3 Got here 00. --> FOAM FATAL ERROR: Not implemented From function directionalKSolidThermo::K(const label) const in file directionalKSolidThermo/directionalKSolidThermo.H at line 134. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 Foam::directionalKSolidThermo::K(int) const in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libbasicSolidThermo.so" #3 Foam::temperatureCoupledBase::K(Foam::Field<double> const&) const in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libcompressibleTurbulenceModel.so" #4 Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs() in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libcompressibleTurbulenceModel.so" #5 Foam::mixedFvPatchField<double>::evaluate(Foam::UPstream::commsTypes) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #6 Foam::mixedEnthalpyFvPatchScalarField::updateCoeffs() in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #7 at gaussLaplacianSchemes.C:0 #8 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #9 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #10 Foam::fv::laplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/user/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #11 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/user/OpenFOAM/user-2.1.x/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam_TensorK" #12 in "/home/user/OpenFOAM/user-2.1.x/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam_TensorK" #13 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #14 in "/home/user/OpenFOAM/user-2.1.x/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam_TensorK" Aborted Best regards, Bruno
__________________
|
|
August 15, 2012, 07:11 |
|
#9 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
Im guessing the boundary condition for T is using
K solidThermo; and not K directionalSolidThermo; N |
|
August 15, 2012, 08:01 |
|
#10 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Niklas,
Confirmed! It works! Attached is the modified solver "chtMultiRegionFoamTensorK.tar.gz" and adapted tutorial "snappyMultiRegionHeaterDirectionalSolid.tar.g z". To unpack and build the solver: Code:
tar -xf chtMultiRegionFoamTensorK.tar.gz cd chtMultiRegionFoamTensorK wmake Code:
./Allrun
Best regards, Bruno
__________________
|
||
August 16, 2012, 05:41 |
|
#11 | |
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 14 |
Hello,
Quote:
Now, i would try to use the MultiRegionSimpleFoam, with KDirectionalSolid. Do you think it's possible to modify this solver too ? I'm not very adroit with the compilation of a new solver (your second step). Best regards, m_f |
||
August 16, 2012, 18:37 |
|
#12 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi m_f,
Attached are both modified solvers inside "chtMultiRegionFoamTensorK_v2.tar.gz" and the adapted tutorial "multiRegionHeaterDirectionalSolid.tar.gz" for chtMultiRegionSimpleFoamTensorK. To unpack and build the two solvers: Code:
tar -xf chtMultiRegionFoamTensorK_v2.tar.gz cd chtMultiRegionFoamTensorK ./Allwmake Code:
./Allrun Best regards, Bruno
__________________
|
|
August 17, 2012, 05:05 |
|
#13 |
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 14 |
Hello wyldckat,
No words to describe my joy. Thank you very much for your investment - in terms of time - in this problem. I saw that this solver use compressible proprieties for the fluid, is it possible to change a parameter (easily) to work with an incompressible flow ? I have an other "easy" question but it isn't the same theme. Thanks again. Best regards, m_f Last edited by m_f; August 17, 2012 at 08:39. |
|
August 18, 2012, 05:07 |
|
#14 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Isn't chtMultiRegionSimpleFoam for incompressible fluids?
__________________
|
|
August 18, 2012, 17:48 |
|
#15 |
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 14 |
Hello and good Saturday,
I don't have my data on this computer but, I remember I had a text-file for rho parameter, and there is a variation in the fluid (between 1,25 and 0,98). And I see on severals websites that it was a compressible solver (source : 1 & 2). Maybe a confirmation on Monday...You make me doubtful. I don't know how to switch between compressible and incompressible or between perfect gaz and boussinesq approximation... To conclude, I search a kind of solver which could solve all heat transfert (conduction/convection(natural or forced)/radiation) between solid and fluid regions, with incompressible flow. I thought that it could exist an incompressible fluids solver as chtMultiRegionSimpleFoam could be a kind of chtMultiRegionBoussinesqSimpleFoam (Combination of heatConductionFoam and buoyantBoussinesqSimpleFoam) including radiation. Have a good week-end ! Best regards, m_f EDIT : Yes I've got a text-file for the density of the fluid. Last edited by m_f; August 20, 2012 at 04:02. |
|
August 20, 2012, 07:44 |
|
#16 |
New Member
Nikola
Join Date: Oct 2011
Posts: 4
Rep Power: 15 |
Hi to all of you,
Thank you very much for a great help you provided to me. regards |
|
August 20, 2012, 09:38 |
|
#17 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quote:
Having the file doesn't mean that file will be used by the solver.
__________________
|
||
August 20, 2012, 11:42 |
|
#18 | |
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 14 |
Yes but this file is used during the resolution. It appears that solver write a new rho file at each iteration, and I can post process it.
:/ So I suppose..? Extract of log.chtMultiRegionSimpleFoamTensorK : Code:
Time = 10 Solving for fluid region fluid DILUPBiCG: Solving for Ux, Initial residual = 7.805865e-08, Final residual = 7.805865e-08, No Iterations 0 [...] time step continuity errors : sum local = 7.809642e-07, global = -6.653458e-08, cumulative = -0.001835181 Min/max rho:0.997834 1.186319 Quote:
|
||
August 20, 2012, 17:24 |
|
#19 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quote:
Mmm... well, it does make sense and SIMPLE itself doesn't imply incompressible flow. But since before I've only seen PIMPLE being used for compressible and SIMPLE for incompressible... I then wrongly assumed chtMultiRegionSimpleFoam was incompressible... As for getting started with modifying solvers, check this tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam
__________________
|
||
August 22, 2012, 08:34 |
|
#20 | ||
Member
M
Join Date: Jul 2012
Posts: 33
Rep Power: 14 |
Hello,
Quote:
Quote:
Best regards, m_f |
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
what is syntax error : missing ')' before ';' | aleisia | Fluent UDF and Scheme Programming | 8 | March 10, 2015 16:42 |
syntax error on config.h | ehooi | Fluent UDF and Scheme Programming | 3 | November 9, 2011 11:05 |
[Other] Turbogrid power syntax | la7low | ANSYS Meshing & Geometry | 0 | January 15, 2011 23:20 |
Interpolation command '-interp-iv' in syntax file | KM | CFX | 4 | October 12, 2007 17:29 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |