|
[Sponsors] |
build my own multi-region solver : pb with flux continuity |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 28, 2013, 04:52 |
build my own multi-region solver : pb with flux continuity
|
#1 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
Hi !
I am currently trying to develop my own multi-region solver. For sake of simplicity, let's say I have two regions, a "solid" and a "fluid". I want to solve heat transfers in both regions, with continuity and flux continuity at the solid/fluid interface. Code:
fvScalarMatrix TsEqn ( fvm::laplacian(DTs,Ts) ); TsEqn.solve(); fvScalarMatrix TfEqn ( fvm::laplacian(DTf,Tf) ); TfEqn.solve(); Code:
patchToPatchInterpolation solid_to_fluid ( solidMesh.boundaryMesh()[labelSolid], fluidMesh.boundaryMesh()[labelFluid] ); patchToPatchInterpolation fluid_to_solid ( fluidMesh.boundaryMesh()[labelFluid], solidMesh.boundaryMesh()[labelSolid] ); Code:
scalarField &TsP = Ts.boundaryField()[labelSolid]; scalarField &TfP = Tf.boundaryField()[labelFluid]; TfP = solid_to_fluid.faceInterpolate(TsP); My problem concern the flux continuity at the region interface. I want to apply the flux continuity imposing the solid temperature gradient at the interface with Code:
vectorField n = fluidMesh.boundary()[labelFluid].nf(); volVectorField gradTf = DTf/DTs*fvc::grad(Tf); scalarField nGradTf = n & gradTf.boundaryField()[labelFluid] ; fixedGradientFvPatchScalarField& gradTsPatch=refCast<fixedGradientFvPatchScalarField>(Ts.boundaryField()[labelSolid]); scalarField& gradTsField = gradTsPatch.gradient(); gradTsField = p2_to_p1.faceInterpolate(nGradTf); best regards, Cyp |
|
November 27, 2013, 09:38 |
|
#2 |
Member
Join Date: May 2012
Posts: 55
Rep Power: 15 |
There is a multiregion solver available:
http://www.cfd-online.com/Forums/ope...eheatfoam.html |
|
November 27, 2013, 13:19 |
|
#3 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
Yes I worked on its basis.
Actually, to solve the "problem" I mentionede above, one need to under-relax the flux boundary condition, and iterate until convergence. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MRFSimpleFoam wind turbine case continuity error | ysh1227 | OpenFOAM Running, Solving & CFD | 1 | August 16, 2016 10:25 |
[Commercial meshers] Using starToFoam | clo | OpenFOAM Meshing & Mesh Conversion | 33 | September 26, 2012 05:04 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 2, 2003 00:32 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |
Build your own CFD solver | Govert de With | Main CFD Forum | 9 | December 12, 2001 06:51 |