CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] boundary condition using groovyBC

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mehtab

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2015, 14:31
Default boundary condition using groovyBC
  #1
Member
 
Mehtab
Join Date: Jan 2015
Posts: 41
Rep Power: 11
mehtab is on a distinguished road
Hi

I would like to implement some boundary conditions using groovyBC and need some help in this regard.

1> Temperature boundary at Inlet

T_s = T_0 + 1/C_p(Q_f/m" - Hvap)


Here Q_f and m ̇ " needs to be computed for inlet patch at previous time step. Also C_p needs to be updated from thermo



Is it possible to do it using groovyBC? Which option is better groovyBC or codedFixedValue in OpenFOAM.

Thanks in advance.....

Last edited by mehtab; April 29, 2015 at 07:44.
mehtab is offline   Reply With Quote

Old   April 27, 2015, 08:39
Default
  #2
Member
 
Mehtab
Join Date: Jan 2015
Posts: 41
Rep Power: 11
mehtab is on a distinguished road
Hi,

I tried implementing temperature boundary condition at Inlet as:

T_s = T_0 + 1/C_p(Q_f/m" - Hv)


Here is my files

Quote:

boundaryField
{
outlet
{
type inletOutlet;
inletValue uniform 298.15;
value uniform 298.15;
}
sides
{
type inletOutlet;
inletValue uniform 298.15;
value uniform 298.15;
}
base
{
type zeroGradient;
}
inlet
{
type groovyBC;
valueExpression "T0+((1/cpi)*((Qf/m)-Hv))";
variables "T0=300;m{inlet}=phi;Hv=8500;Qf{inlet}=Qr;cpi{inle t}=cp;";
value 300;

}
Quote:
controlDict
application fireFoam;

startFrom startTime;

startTime 0.0;

stopAt endTime;

endTime 1.0;

deltaT 1.0e-2;

writeControl adjustableRunTime;

writeInterval 0.01;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

graphFormat raw;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.6;

maxDeltaT 0.1;

functions
{
fieldAverage
{
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;

fields
(
U
{
mean on;
prime2Mean on;
base time;
}
T
{
mean on;
prime2Mean on;
base time;
}
CH4
{
mean on;
prime2Mean on;
base time;
}
CO2
{
mean on;
prime2Mean on;
base time;
}
H2O
{
mean on;
prime2Mean on;
base time;
}
O2
{
mean on;
prime2Mean on;
base time;
}
);
}

libs (
"libOpenFOAM.so"
"libgroovyBC.so"
"libgroovyStandardBCs.so"
"libsimpleFunctionObjects.so"
"libsimpleSwakFunctionObjects.so"
"libswakFunctionObjects.so"
"libswakPythonIntegration.so"
"libswakTransportTurbFunctionPlugin.so"
) ;
I also checked my solver fireFoam createFields.H to check how Cp is being used.

Quote:
createFields.H

volScalarField cp
(
IOobject
(
"cp",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
thermo.Cp()
);
I am getting this error:

swak4Foam: Setting default mesh
swak4Foam: Allocating new repository for sampledGlobalVariables
--> FOAM Warning :
From function ConcretePluginFunction<DriverType>::exists
in file lnInclude/ConcretePluginFunction.C at line 121
Constructor table of plugin functions for PatchValueExpressionDriver is not initialized


--> FOAM FATAL ERROR:
Parser Error for driver PatchValueExpressionDriver at "1.1-2" :"field Qr not existing or of wrong type"
"Qr"
^^
--|

Context of the error:


- Driver constructed from scratch
Evaluating expression "Qr"


From function parsingValue
in file lnInclude/CommonValueExpressionDriverI.H at line 1189.

FOAM exiting


What should I modify in me expressions? Have I defined cp correctly or should I change to thermo.Cp? Here Qr is totat radiative flux being calculated through radiation model. I am not able to understand the error. Please help

Thanks in advance....
Kummi likes this.

Last edited by mehtab; April 29, 2015 at 07:48.
mehtab is offline   Reply With Quote

Reply

Tags
gschaider


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
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 02:44
[swak4Foam] Boundary condition set using groovyBC or codedFixedValue behzad-cfd OpenFOAM Community Contributions 17 December 19, 2017 13:30
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
[swak4Foam] turbulence boundary condition in groovyBC. immortality OpenFOAM Community Contributions 6 January 7, 2013 04:19


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