|
[Sponsors] |
May 14, 2012, 10:51 |
setting momentum source with fieldSources
|
#1 |
Senior Member
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 124
Rep Power: 19 |
Hello all,
I am trying to run the channel simulation channelFoam from the tutorials with the pressure gradient set by using the new featurei in OF 2.1: fieldSources. I seems that it should be possible to use this in stead of adding the momentum source in the solver code, as is done channelFoam. However, I got problems with getting it running. In the channel channel395 simulation I have added in the fvSolution the PIMPLE properties and UFinal properties. This allow to run the case with pimpleFoam. In the pimpleFoam solver there is now a momentum source at the right hand side of the U-equation: sources(U). I want to define the pressuregradient, so I have added to following file sourceProperties to the constant directory with the folling contents Code:
presGradient { type pressureGradientExplicitSource; active off; //on/off switch timeStart 0.0; //start time duration 1e10; //duration selectionMode all; //cellSet // points //cellZone pressureGradientExplicitSourceCoeffs { fieldNames (U); Ubar (0.1335 0 0 ); // set Re=64,000 // flowDir (1.0 0 0 ); // set Re=64,000 gradPini gradPini [0 2 -2 0 0] 0; // initial pressure gradient } } Code:
FOAM FATAL ERROR: request for volScalarField (1|A(U)) from objectRegistry region0 failed available objects of type volScalarField are 2 ( nu p ) From function objectRegistry::lookupObject<Type>(const word&) const in file /apps/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 131. Any hints appreciated Regards Eelco |
|
May 15, 2012, 07:45 |
problem solved
|
#2 |
Senior Member
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 124
Rep Power: 19 |
For those interested: it appeared to be a bug in the pimpleFoam of 2.1.0, which is already fixed in pimpeFoam 2.1.x, where the call to the sources(U) term UEqn.H was moved below the declaration of rAU.
I tested the source term on the channelFoam tutorial case by adding the file sourceProperties to the constant directory and run pimpleFoam. Indeed the same results as using channelFoam is obtained. Code:
presGradient { type pressureGradientExplicitSource; active on; //on/off switch timeStart 0.0; //start time duration 1e10; //duration selectionMode all; //cellSet // points //cellZone pressureGradientExplicitSourceCoeffs { fieldNames (U); Ubar (0.1335 0 0 ); // set Re=64,000 flowDir (1.0 0 0 ); // set Re=64,000 gradPini gradPini [0 1 -2 0 0] 0; // initial pressure gradient } } |
|
July 14, 2013, 16:57 |
|
#3 |
Member
Jack
Join Date: Aug 2012
Posts: 47
Rep Power: 13 |
Hi,
I noticed this thread, even though it is a bit old - I have a question! When I run pimpleFoam with a pressure source as you describe above, my results seem ok, except for the pressure field. When I observe them in paraview the pressure gradient isn't apparent (I have a PG of 20, but my results don't indicate this). Everything else seems fine! Any help on this would be really appreciated! Best wishes, Jack |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Momentum source coefficient, cylindrical coordinates, circumferential component? | polakse | CFX | 15 | January 18, 2016 03:40 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 18:18 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
no enthalpy change across the momentum source | Atit Koonsrisuk | CFX | 2 | December 19, 2005 03:33 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |