|
[Sponsors] |
May 23, 2013, 15:21 |
|
#21 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
thank you for your full clarification.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
May 25, 2013, 16:16 |
|
#22 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
Hi again!
and what will be the proper code for an incompressible case? I wrote sp(rho,gas) in pimpleFoam and it got an error and when removed rho from equation in got another error:http://www.cfd-online.com/Forums/ope...tml#post430020 so whats the correct equation?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
May 26, 2013, 04:17 |
|
#23 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Quote:
Hi Code:
ddt(phi, gas) |
||
May 26, 2013, 05:30 |
|
#24 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
Hi,sure it needs to be modified:
Code:
fvScalarMatrix gasEqn ( fvm::ddt(phi,gas) -fvm::Sp(phi, gas) +fvm::div(phi, gas) -fvm::Sp(fvc::div(phi), gas) -fvm::laplacian(turbulence->nuEff(), gas) ); gasEqn.relax(); gasEqn.solve(mesh.solver("gas")); Code:
Making dependency list for source file pimpleFoamModified.C SOURCE=pimpleFoamModified.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/pimpleFoamModified.o In file included from pimpleFoamModified.C:89:0: gasEqn.H: In function ‘int main(int, char**)’: gasEqn.H:5:20: error: no matching function for call to ‘ddt(Foam::surfaceScalarField&, Foam::volScalarField&)’ gasEqn.H:5:20: note: candidates are: /opt/openfoam220/src/finiteVolume/lnInclude/fvmDdt.C:45:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::ddt(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmDdt.C:60:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::ddt(const Foam::one&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmDdt.C:72:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::ddt(const dimensionedScalar&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmDdt.C:88:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::ddt(const volScalarField&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) gasEqn.H:6:27: error: no matching function for call to ‘Sp(Foam::surfaceScalarField&, Foam::volScalarField&)’ gasEqn.H:6:27: note: candidates are: /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:100:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::DimensionedField<double, Foam::volMesh>&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:126:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::tmp<Foam::DimensionedField<double, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:140:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:154:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const dimensionedScalar&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:180:1: note: template<class Type> Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) make: *** [Make/linux64GccDPOpt/pimpleFoamModified.o] Error 1
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
May 26, 2013, 13:52 |
|
#26 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
Hi tobias
I changed it: Code:
fvScalarMatrix gasEqn ( fvm::ddt(gas) -fvm::Sp(phi, gas) +fvm::div(phi, gas) -fvm::Sp(fvc::div(phi), gas) -fvm::laplacian(turbulence->nuEff(), gas) ); gasEqn.relax(); gasEqn.solve(mesh.solver("gas")); Code:
ehsan@Ehsan-com:~/Desktop/Solvers/pimpleFoamModified$ wmake Making dependency list for source file pimpleFoamModified.C SOURCE=pimpleFoamModified.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/turbulenceModels/incompressible/turbulenceModel -I/opt/openfoam220/src/transportModels -I/opt/openfoam220/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/opt/openfoam220/src/fvOptions/lnInclude -I/opt/openfoam220/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/pimpleFoamModified.o In file included from pimpleFoamModified.C:89:0: gasEqn.H: In function ‘int main(int, char**)’: gasEqn.H:6:27: error: no matching function for call to ‘Sp(Foam::surfaceScalarField&, Foam::volScalarField&)’ gasEqn.H:6:27: note: candidates are: /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:100:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::DimensionedField<double, Foam::volMesh>&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:126:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::tmp<Foam::DimensionedField<double, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:140:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:154:1: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::Sp(const dimensionedScalar&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:180:1: note: template<class Type> Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) make: *** [Make/linux64GccDPOpt/pimpleFoamModified.o] Error 1 I don't know yet exactly when we have to use Sp term.could you please clarify again for me?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
December 25, 2013, 10:46 |
|
#27 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
Hi dear Tobias
this link has been broken,could you give me another link for referencing? thanks. http://www.holzmann-cfd.de/index.php...rische-schemen
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
December 25, 2013, 12:03 |
|
#28 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Ehsan: Quote:
Best regards, Bruno
__________________
|
||
January 13, 2014, 10:52 |
|
#30 | |
Member
Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 13 |
Quote:
A while ago you also mentioned this solution to me on the libOpenSmoke forum. However I think it is more appropriate to ask you here, since this is about the scalar solver. Can you share your solver with two different densities for the mixing of air and methane? As background, I want to model the mixing of a fuel (methane) with air. Regards, |
||
January 14, 2014, 11:38 |
|
#31 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
Hi dear Tobias,
for an unsteady flow,are these schemes appropriate?is bounded scheme suitable for ddt(rho,gas)? the results seemed fine and now I noticed about maybe excess "bounded" term in schemes.are they OK in your opinion? Code:
ddtSchemes { default none; ddt(rho) CrankNicolson .5; ddt(rhoU) CrankNicolson .5; ddt(rhoE) CrankNicolson .5; ddt(rho,U) CrankNicolson .5; ddt(rho,e) CrankNicolson .5; ddt(rho,h) CrankNicolson .5; ddt(rho,k) bounded CrankNicolson .5; ddt(rho,omega) bounded CrankNicolson .5; ddt(rho,epsilon) bounded CrankNicolson .5; ddt(rho,gas) bounded CrankNicolson .5; } divSchemes { default none; div(tauMC) Gauss linear; div(phi,k) bounded Gauss upwind; div(phi,omega) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(phi,gas) bounded Gauss limitedLimitedLinear 1 0 1; } Code:
// --- Scalar Transport( Solving equation of variance of mixture fraction ) tmp<fvScalarMatrix> gasEqn ( fvm::ddt(rho,gas) -fvm::Sp(fvc::ddt(rho), gas) +fvm::div(phi, gas) -fvm::Sp(fvc::div(phi), gas) -fvm::laplacian(turbulence->muEff(), gas) ); gasEqn().relax(); gasEqn().solve(mesh.solver("gas"));
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
January 14, 2014, 12:32 |
|
#32 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Quote:
yes I have that solver - anywhere on my Harddisc - Is it possible that you share your results? Regards Tobi PS: Further answer to the schemes is comming (no time at the moment) |
||
January 23, 2014, 08:47 |
|
#33 | |
Member
Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 13 |
Quote:
I would be very happy to test this solver, since it would help a lot to model a steady state mixing of gases with different densities. My main goal is to run combustion simulations (with the use of libOpenSmoke/ flameletSimple/PisoFOam). However as step before and to assess nozzle designs I would like to model fuel and air mixing without chemical reactions involved, for this the scalar solver could be very helpful, since steady state is almost the only option. The simulations I am doing on real geometries are strictly confidential, so there is no way of sharing them . For the cold flow mixing I will also run some academic cases (when I have time...) and it should be possible to share some of those results. Mit freundlichen Grüßen, |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 07:15 |
dieselFoam problem!! trying to introduce a new heat transfer model | vivek070176 | OpenFOAM Programming & Development | 10 | December 23, 2014 23:48 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 01:47 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 01:27 |
passive scalar for carbon monoxide | kraizy | STAR-CCM+ | 0 | October 12, 2009 20:13 |