# passive scalar increases

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 23, 2013, 15:21 #21 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,209 Rep Power: 20 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,209 Rep Power: 20 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: Leoben (Austria)
Posts: 2,025
Blog Entries: 6
Rep Power: 34
Quote:
 Originally Posted by immortality 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?

Hi

Code:
`ddt(phi, gas)`
should work

 May 26, 2013, 05:30 #24 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,209 Rep Power: 20 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"));``` this error occurred: 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 Foam::tmp > Foam::fvm::ddt(const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmDdt.C:60:1: note: template Foam::tmp > Foam::fvm::ddt(const Foam::one&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmDdt.C:72:1: note: template Foam::tmp > Foam::fvm::ddt(const dimensionedScalar&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmDdt.C:88:1: note: template Foam::tmp > Foam::fvm::ddt(const volScalarField&, const Foam::GeometricField&) 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 Foam::tmp > Foam::fvm::Sp(const Foam::DimensionedField&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:126:1: note: template Foam::tmp > Foam::fvm::Sp(const Foam::tmp >&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:140:1: note: template Foam::tmp > Foam::fvm::Sp(const Foam::tmp >&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:154:1: note: template Foam::tmp > Foam::fvm::Sp(const dimensionedScalar&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:180:1: note: template Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam::GeometricField&) 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:18 #25 Super Moderator     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 2,025 Blog Entries: 6 Rep Power: 34 Sorry... my fault: Code: `fvm::ddt(gas)`

 May 26, 2013, 13:52 #26 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,209 Rep Power: 20 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"));``` but the error persists: 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 Foam::tmp > Foam::fvm::Sp(const Foam::DimensionedField&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:126:1: note: template Foam::tmp > Foam::fvm::Sp(const Foam::tmp >&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:140:1: note: template Foam::tmp > Foam::fvm::Sp(const Foam::tmp >&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:154:1: note: template Foam::tmp > Foam::fvm::Sp(const dimensionedScalar&, const Foam::GeometricField&) /opt/openfoam220/src/finiteVolume/lnInclude/fvmSup.C:180:1: note: template Foam::zeroField Foam::fvm::Sp(const Foam::zero&, const Foam::GeometricField&) make: *** [Make/linux64GccDPOpt/pimpleFoamModified.o] Error 1``` maybe the Sp term should be removed? 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, 11:46 #27 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,209 Rep Power: 20 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, 13:03
#28
Super Moderator

Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
Greetings to all!

@Ehsan:
Quote:
 Originally Posted by immortality 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
If think the new link is this one: http://www.holzmann-cfd.de/index.php/numerische-schemen

Best regards,
Bruno
__________________

 December 25, 2013, 13:03 #29 Super Moderator     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 2,025 Blog Entries: 6 Rep Power: 34 Hi Ehsan, here is the actual link: http://www.holzmann-cfd.de/index.php/numerische-schemen wyldckat likes this.

January 13, 2014, 11:52
#30
Member

Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 6
Quote:
 Originally Posted by Tobi For that I build a new one with two different densitys (not tested).
Hi Tobi,

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, 12:38 #31 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,209 Rep Power: 20 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; } ``` and its the transport equation: Code: ``` // --- Scalar Transport( Solving equation of variance of mixture fraction ) tmp 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, 13:32
#32
Super Moderator

Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 2,025
Blog Entries: 6
Rep Power: 34
Quote:
 Originally Posted by TBO Hi Tobi, 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,
Hi,

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, 09:47
#33
Member

Join Date: May 2013
Location: Netherlands
Posts: 30
Rep Power: 6
Quote:
 Originally Posted by Tobi yes I have that solver - anywhere on my Harddisc - Is it possible that you share your results? Regards Tobi
Hi Tobi,

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,

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post vivek070176 OpenFOAM Programming & Development 10 December 24, 2014 00:48 riesotto OpenFOAM 50 May 26, 2014 01:47 immortality OpenFOAM Running, Solving & CFD 11 April 22, 2014 12:32 immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27 kraizy STAR-CCM+ 0 October 12, 2009 20:13

All times are GMT -4. The time now is 10:27.