CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

passive scalar increases

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 23, 2013, 06:57
Default
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Hi again before close the issue dossier!
when I used linear scheme for probably more accuracy it didn't get a good result(not good appearance and also higher than 1)
Code:
div(phi,gas) Gauss linear;
but in upwind worked well again.
the question is:why its so?!
Attached Images
File Type: jpg gas_1.5e-5_100*10.jpg (16.5 KB, 26 views)
File Type: jpg gas_1.5e-5_500*50.jpg (15.5 KB, 24 views)
__________________
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.
immortality is offline   Reply With Quote

Old   May 23, 2013, 07:15
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by immortality View Post
Hi again before close the issue dossier!
when I used linear scheme for probably more accuracy it didn't get a good result(not good appearance and also higher than 1)
[CODEdiv(phi,gas) Gauss linear;][/CODE]
but in upwind worked well again.
the question is:why its so?!

That depend on the schemes. On my Homepage you can find a summary about that Topic (unfortunatelly only in german). But the grapics show everything I think.


http://www.holzmann-cfd.de/index.php...rische-schemen
Tobi is offline   Reply With Quote

Old   May 23, 2013, 07:21
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Info about the added Lines: Sp(...)

-> http://www.cfd-online.com/Forums/ope...tml#post407482
Tobi is offline   Reply With Quote

Old   May 23, 2013, 08:18
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
thanks Tobias
related to vanLeer nothing has said but it has nice results,then what do you suggest for better accurate and physical results for passive scalar transport?
__________________
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.
immortality is offline   Reply With Quote

Old   May 23, 2013, 11:44
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by immortality View Post
thanks Tobias
related to vanLeer nothing has said but it has nice results,then what do you suggest for better accurate and physical results for passive scalar transport?
I always prefer 2. order schemes.

For the scalar I prefer
Code:
limitedLimitedLinear 1 0 1
Tobi is offline   Reply With Quote

Old   May 23, 2013, 14:45
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
thanks.
vanLeer isn't a second order scheme?
what do 1 0 1 refer to respectively in the scheme?
__________________
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.
immortality is offline   Reply With Quote

Old   May 23, 2013, 15:05
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
vanLeer is a second order scheme.

To prevent unphysical results (the only scheme which is not producing unphysical results is gauss upwind 1st order) you can use limited schemes and schemes that are bouding the values:

Code:
 
limtiedLinear 1
limitedLinear 0.33
limitedLinear 0 = linear
The number behind the name is the value of the lmiiter. If you set it to one you have full limited functionallity. If you set it to zero there is no limiting in the scheme so you have the normal linear scheme.


Code:
limitedLimitedLinear 1 0 1
- first number is for the limiter function as befor

- the second one is the lower bouding value
- the third one is the upper bouding value


As you set your scalar between 0-13.54 you should write:

Code:
limitedLimitedLinear 1 0 13.54
immortality likes this.

Last edited by Tobi; May 24, 2013 at 07:38. Reason: prefent :D
Tobi is offline   Reply With Quote

Old   May 23, 2013, 15:21
Default
  #8
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   May 25, 2013, 16:16
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   May 26, 2013, 04:17
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by immortality View Post
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
Tobi is offline   Reply With Quote

Old   May 26, 2013, 05:30
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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<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.
immortality is offline   Reply With Quote

Old   May 26, 2013, 13:18
Default
  #12
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Sorry... my fault:

Code:
fvm::ddt(gas)
Tobi is offline   Reply With Quote

Old   May 26, 2013, 13:52
Default
  #13
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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<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
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.
immortality is offline   Reply With Quote

Old   December 25, 2013, 10:46
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   December 25, 2013, 12:03
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Ehsan:
Quote:
Originally Posted by immortality View Post
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
Tobi likes this.
__________________
wyldckat is offline   Reply With Quote

Old   December 25, 2013, 12:03
Default
  #16
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Ehsan,

here is the actual link:

http://www.holzmann-cfd.de/index.php/numerische-schemen
wyldckat likes this.
Tobi is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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