CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   chtMultiRegionFoam - offset (https://www.cfd-online.com/Forums/openfoam/71158-chtmultiregionfoam-offset.html)

santoo_cfd December 17, 2009 08:03

chtMultiRegionFoam - offset
 
Can anybody tell me how to give value for offset, sampleRegion, sampleFace in boundary dictionary for interface.

I have given as following after having a look at multiRegionHeater tutorial--

Code:

solid_to_fluid
    {
        type            directMappedWall;
        nFaces          7200;
        startFace      101160;
        sampleMode      nearestPatchFace;
        //sampleRegion    region0;
        //samplePatch    none;
        sampleRegion    fluid;
        samplePatch    fluid_to_solid;
        offset          (0 0 0);
    }
    solid_to_domain2
    {
        type            directMappedWall;
        nFaces          7200;
        startFace      108360;
        sampleMode      nearestPatchFace;
        //sampleRegion    region0;
        //samplePatch    none;
        sampleRegion    domain2;
        samplePatch    domain2_to_solid;
        offset          (0 0 0);
    }

I got following error...please help..


--> FOAM Warning :
From function directMappedPatchBase::calcMapping() const
in file directMapped/directMappedPolyPatch/directMappedPatchBase.C at line 451
The actual cell/face centres picked up using offset (0 0 0) are not
on a single plane. This might give numerical problems.
At patchface (5.426277 5.870002 0.25) the sampled cell/face (5.426277 5.870002 0.25)
is not on a plane 2.84493e-15 offset from the patch.
You might want to shift your plane offset. Set the debug flag to get a dump of sampled cells.


Attempt to cast type zeroGradient to type solidWallMixedTemperatureCoupled#0 Foam::error::printStack(Foam::Ostream&) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#3 Foam::solidWallMixedTemperatureCoupledFvPatchScala rField::updateCoeffs() in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#4 Foam::mixedFvPatchField<double>::evaluate(Foam::Ps tream::commsTypes) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#5 Foam::mixedEnthalpyFvPatchScalarField::updateCoeff s() in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#6 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensionSet const&) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#7 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricFi eld<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#8 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#9 Foam::fv::laplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#10 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>&, Foam::word const&) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#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>&) in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#12 main in "/home2/cfd/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/chtMultiRegionFoam"
#13 __libc_start_main in "/lib64/tls/libc.so.6"
#14 _start at ../sysdeps/x86_64/elf/start.S:116

santoo_cfd December 30, 2009 00:24

Water in thermoPhysicalProperty Dict
 
Hi,

I could able to solve the offset problem, but I am not sure of how it is been solved.
I just scaled the geometry which I initially forgot to.

Now the case is running, But the new problem I am facing is.

1. Time step became so low to 1e-06, so my simulation taking so much time.

2, I initially tried with air in the thermoPhysicalProperty dictionary. But Actully I want is twith water. I have mention water as following,

Code:


thermoType      hPsiThermo<pureMixture<constTransport<specieThermo<hConst
Thermo<perfectGas>>>>>;

mixture        water 1 18 4180 0 1.0e-06 7.01;

Is this correct, Because I am getting doublt that I cannot use perfectgas, pure mixure assumtion here.

Please provide your help in solving above 2 issues.

PS-1: I have searched all the tutorials, In no one water is used as working fluid.
PS-2: The problem I am solving is Tube-in-Tube Heat exchange where solid region is sandwiched b/w two fluid region carrying hot and cold water resp.

Regards
Santhosh..

ronaldo January 1, 2010 07:16

1 Attachment(s)
This could help you!

http://www.opencfd.co.uk/openfoam/th...calModels.html

You have to calculate the time step. It very important for your simulation.

santoo_cfd January 1, 2010 09:41

Thanks for the help.

I have already looked at the link you have given. Also I have entered water properties in the sequence as you mentioned in the attached file.

But my basic doubt is that can we use the following syntax for water

Code:

thermoType      hPsiThermo<pureMixture<constTransport<specieThermo<hConst
Thermo<perfectGas>>>>>;

.

In the multiRegionFoam source code, only the basicThermo header file is included, thus when I wanted to change the above syntax, I am getting the error suggesting to use above syntax only. My doubt is does above syntax suits for water or not.

Can u also elaborate the sentence of "calculation timestep". I am using the feature of auto adjusting time step based on the max Courant number in controlDict dictionary. Is this what you wanted to say.

Thanks
Santosh...

ronaldo January 1, 2010 13:45

Quote:

Originally Posted by santoo_cfd (Post 241224)
Thanks for the help.

I have already looked at the link you have given. Also I have entered water properties in the sequence as you mentioned in the attached file.

But my basic doubt is that can we use the following syntax for water

Code:

thermoType      hPsiThermo<pureMixture<constTransport<specieThermo<hConst
Thermo<perfectGas>>>>>;

.

In the multiRegionFoam source code, only the basicThermo header file is included, thus when I wanted to change the above syntax, I am getting the error suggesting to use above syntax only. My doubt is does above syntax suits for water or not.

Can u also elaborate the sentence of "calculation timestep". I am using the feature of auto adjusting time step based on the max Courant number in controlDict dictionary. Is this what you wanted to say.

Thanks
Santosh...

If only the basicThermo header file is included In the multiRegionFoam source code, then you have to entered water properties in the sequence.
The time step depend on cell numbers. It is better to calculated it as show in the userGuide.

santoo_cfd January 6, 2010 07:55

I got my doubt much clear now.

In openFOAM the density is calculated as
Code:

thermo.rho=psi_*p
where compressibility psi is calculated as
Code:

perfectgas::psi = 1/RT
.

Now my doubt is that will this calculation of psi is applicable to water or not (with perfect gas assumption)?

Also, In my case (water as a working fluid) when I looked at the rho field in time directories written by FOAM, the values are ranging from 0.7-0.8. where as in tutorial case (with air as working fluid) the density is around 10-100.

Please hint me in this regard. Do I need to change the solver to take other thermophysical models or present one is OK?

Regards
Santosh..

santoo_cfd January 6, 2010 08:00

Also with water being incompressible do I need to bother about calculating rho in the chtMultiRegionFoam solver. ( I mean I can just pull out all the rho terms from the equations)

Regards
Santosh..

santoo_cfd January 12, 2010 07:04

I ran the case with constant density chtMultiRegionFoam. I found following observation along with problem discussion:

Problem:

I am solving a tube-in-tube kind of heat exchanger, in which hot water flow inner annulus followed for solid region (copper) and cold water flow in the outer annulus

Temp of hot water inlet - 355k & flow rate 0.5m/s
Temp of cold water inlet - 283k & flow rate 1m/s

My region conventions are:
inner fluid region - fluid
Solid region - solid
Outer fluid region - domain2


Observations/Problems

1. The flow and temperature profiles are very well in both inner and outer fluid regions, but the temperature of solid region doesn't change (It changes very little, If I initialized with 300 the range of variations is 299.9 - 300.2

2. The time step is very very small for Co=0.5 (delta = 0.0001). So the overall computational time is increasing very much.

1. What is the importance of giving temperature value in solidWallMixedTemperatureCoupled. (Because this temp we cannot fix it, It has to develop as the flow develops.

Regards
Santhosh..

openfoam1 January 27, 2010 10:01

hi

i'm also don't know how to use water in thermophysicalProperties file

any one can help

best regards

johnb April 27, 2010 03:34

use of water in chtMultiRegionFoam
 
Hi Santhosh,

Have you been able to sort out how to incorporate water as fluid in chtMultiRegionFoam? This would then be very interesting for me as well.

Regards,

John

santoo_cfd April 27, 2010 11:08

No, I could not figure out anything more, In fact I stopped that activity as I ran out of Ideas, If you have any hints I would be happy to test it.

Regards
Santhosh

marval November 1, 2010 15:01

multiRegionLiquidFoam
 
Hi everyone!

This may be of help unless you've already figured it out by yourselves.

Quote:

Originally Posted by juho (Post 280323)
In the 1.7.x version, the chtMultiRegionFoam and chtMultiRegionSimpleFoam have recently been modified to use hRhoThermo, which allows icoPolynomial equation of state and thus simulation of liquid flows.

Check Henry's commits 14.-15.10.2010:
http://github.com/OpenCFD/OpenFOAM-1.7.x/commits/master

Hope it helps!

Ragards
Marco


All times are GMT -4. The time now is 18:30.