CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

Search Results

Register Blogs Community New Posts Updated Threads Search

Showing results 1 to 20 of 20
Search took 0.00 seconds.
Search: Posts Made By: Gbaz
Forum: OpenFOAM Programming & Development November 12, 2018, 07:03
Replies: 37
Views: 2,837
Posted By Gbaz
It was fixed this way: scalar alfInt =...

It was fixed this way:

scalar alfInt = fvc::domainIntegrate(alpha).value()
scalar vol = gSum (mesh.V())
scalar alfAvg = alfInt/vol

now results make sense.

Thanks a lot Caelan for...
Forum: OpenFOAM Programming & Development November 11, 2018, 10:39
Replies: 37
Views: 2,837
Posted By Gbaz
Yes Actually I use parafoam to visualize the...

Yes Actually I use parafoam to visualize the results.

when alpha is correct, (keeping all parameters controlled), the above formula doesn't give me the correct average value for alpha. It always...
Forum: OpenFOAM Programming & Development November 10, 2018, 00:43
Replies: 37
Views: 2,837
Posted By Gbaz
Here, based on domain integrate, the calculated...

Here, based on domain integrate, the calculated value is close to zero (1e-9).
but using volFieldValue as a functionObject, the obtained alfAvg was accurate (varying smoothly from 1 to 0.8). This is...
Forum: OpenFOAM Programming & Development November 9, 2018, 16:41
Replies: 37
Views: 2,837
Posted By Gbaz
Daer Caelan, None of the above definitions...

Daer Caelan,

None of the above definitions for alfAvg give me the corrsct Volume Avarged alpha.

scalar alfAvg = fvc::domainIntegratte(alpha).value()/alpha.size()scalar

alfAvg =...
Forum: OpenFOAM Programming & Development November 7, 2018, 15:39
Replies: 37
Views: 2,837
Posted By Gbaz
I think it's going to start.:) for initial...

I think it's going to start.:)

for initial file of Tsol what do you suggest?

cannot find file "C:/PROGRA~1/BLUECF~1/ofuser-of5/run/solidif/0/Tsol"

do I need something like T ?

cheers
Forum: OpenFOAM Programming & Development November 7, 2018, 15:09
Replies: 37
Views: 2,837
Posted By Gbaz
sorry for my mistake. I applied alfAvg definition...

sorry for my mistake. I applied alfAvg definition wrongly. Now it's running. will post you the update soon.
Forum: OpenFOAM Programming & Development November 7, 2018, 14:57
Replies: 37
Views: 2,837
Posted By Gbaz
yes it is a volScalarField. with the new...

yes it is a volScalarField.

with the new averageing I get this compilation error:

pimpleFoam.C:92:59: error: cannot convert 'Foam::dimensioned<double>' to 'Foam::scalar {aka double}' in...
Forum: OpenFOAM Programming & Development November 7, 2018, 14:37
Replies: 37
Views: 2,837
Posted By Gbaz
alpha is defined in TEqn as this (last line): ...

alpha is defined in TEqn as this (last line):

fvScalarMatrix TEqn

(
fvm::ddt(cp, T)
+ fvm::div(phi*fvc::interpolate(cp), T)
+...
Forum: OpenFOAM Programming & Development November 7, 2018, 14:26
Replies: 37
Views: 2,837
Posted By Gbaz
with this gSum, I get this compiling error: ...

with this gSum, I get this compiling error:

pimpleFoam.C:91:37: error: no matching function for call to 'gSum(Foam::tmp<Foam::DimensionedField<double, Foam::volMesh> >)'
...
Forum: OpenFOAM Programming & Development November 7, 2018, 13:53
Replies: 37
Views: 2,837
Posted By Gbaz
Caelan: Where did you place the alfAvg code? And...

Caelan: Where did you place the alfAvg code? And do you declare it in createFields?

Gbaz: alfAvg is in pimpleFoam, at the end of runTime loop as:

while (runTime.loop())
{
...
Forum: OpenFOAM Programming & Development November 7, 2018, 10:37
Replies: 37
Views: 2,837
Posted By Gbaz
Thanks Caelan for your help. :) Applying...

Thanks Caelan for your help.
:)

Applying all your comment, now I want to trace Tsol values over the the domain. basically it should be changing as alfAvg is changed as

Tsol=0.5*(Tl+Ts)*alfAvg;...
Forum: OpenFOAM Programming & Development November 6, 2018, 15:33
Replies: 37
Views: 2,837
Posted By Gbaz
Applying above comments, outputs are still...

Applying above comments, outputs are still showing that Tsol is not updated. This means alfAvg is not also updated and remains equal to initial value of alfAvg.

by the way, I tried to remove...
Forum: OpenFOAM Programming & Development November 6, 2018, 15:05
Replies: 37
Views: 2,837
Posted By Gbaz
Caelan:I'd recommend putting the code to...

Caelan:I'd recommend putting the code to calculate Tsol inside Teqn.H.
Gbaz: I removed it from pimplefoam.c and added it to TEqn as this:


dimensionedScalar Tsol=0.5*(Tl+Ts)*pow(alfAvg,10);...
Forum: OpenFOAM Programming & Development November 6, 2018, 14:50
Replies: 37
Views: 2,837
Posted By Gbaz
Thanks Linda. I did so and now applying Caelan's...

Thanks Linda. I did so and now applying Caelan's comment.
Forum: OpenFOAM Programming & Development November 6, 2018, 14:27
Replies: 37
Views: 2,837
Posted By Gbaz
with your guidance, I edited my previous thread....

with your guidance, I edited my previous thread. Hope you can see it in a better way now. Appreciate your comment.
Forum: OpenFOAM Programming & Development November 6, 2018, 13:49
Replies: 37
Views: 2,837
Posted By Gbaz
Thanks for your advise. I rewrite it as this....

Thanks for your advise. I rewrite it as this. "Tsol" is in TEqn.

You are right. I forgot !

This is runTime loop:

while (runTime.loop())
{
Info<< "Time = " << runTime.timeName()...
Forum: OpenFOAM Programming & Development November 6, 2018, 13:14
Replies: 37
Views: 2,837
Posted By Gbaz
Dear Caelan, Thanks to your post, I could...

Dear Caelan,

Thanks to your post, I could modified the code. However, still I think the alfAvg is not engaged with other fields.

What I did is this:

for volume fraction, alfAvg, I removed...
Forum: OpenFOAM Programming & Development November 5, 2018, 13:36
Replies: 37
Views: 2,837
Posted By Gbaz
I think you are absolutely right. what I...

I think you are absolutely right.


what I did in controlDict for defining the new field alfAvg is:

functions
alfAvg
{
type volFieldValue;
libs ("libfieldFunctionObjects.so");
Forum: OpenFOAM Programming & Development November 5, 2018, 00:58
Replies: 37
Views: 2,837
Posted By Gbaz
Hi Caelan, Thanks for your help. I have...

Hi Caelan,

Thanks for your help.

I have a code based on PimpleFoam, modified for solidification. The soldification temperature (Tsol) is a function of total liquid fraction (alphAvg)....
Forum: OpenFOAM Programming & Development November 4, 2018, 15:13
Replies: 37
Views: 2,837
Posted By Gbaz
creating a new field by volume averaging of an existing field and reuse it in Solver

Hello Foamers,

Using VolfieldValue, I created a new field based on volume averaging of an existing field. Now, I don't know how to ask Solver to call and read the new field and use it for its next...
Showing results 1 to 20 of 20

 
Forum Jump

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