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

Search Results

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

Showing results 1 to 25 of 27
Search took 0.00 seconds.
Search: Posts Made By: bigphil
Forum: OpenFOAM Running, Solving & CFD August 3, 2022, 11:28
Replies: 82
Views: 18,868
Posted By bigphil
Hi Siddhartha, Please give more details,...

Hi Siddhartha,

Please give more details, including, what value (or gradient or combination) you are trying to enforce on the boundary. In addition, please give details of what you have tried so...
Forum: OpenFOAM Running, Solving & CFD December 14, 2021, 09:28
Replies: 82
Views: 18,868
Posted By bigphil
The following works in OpenFOAM-7 (I don't have...

The following works in OpenFOAM-7 (I don't have OF-5), where I edited icoFoam.C:

Info<< "\nStarting time loop\n" << endl;

while (runTime.loop())
{
Info<< "Time = " <<...
Forum: OpenFOAM Running, Solving & CFD December 14, 2021, 08:45
Replies: 82
Views: 18,868
Posted By bigphil
Both of those functions refer to GeometricFields,...

Both of those functions refer to GeometricFields, however, in your case you are calling the "==" operator for a fvPatchField. From a quick check of the OF 5 Github code...
Forum: OpenFOAM Running, Solving & CFD December 14, 2021, 07:09
Replies: 82
Views: 18,868
Posted By bigphil
Which version of OpenFOAM are you using? ...

Which version of OpenFOAM are you using?

Maybe the "==" operator has been redefined, and the values need to be set using another approach.
Forum: OpenFOAM Running, Solving & CFD December 13, 2021, 09:06
Replies: 82
Views: 18,868
Posted By bigphil
What U boundary condition are you using for the...

What U boundary condition are you using for the "sphere" patch?
Where in your solver do you call this code?
You can check the current boundary condition and its values in the code, by printing it...
Forum: OpenFOAM Running, Solving & CFD September 7, 2020, 11:18
Replies: 82
Views: 18,868
Posted By bigphil
Hi Shiyu, In the code you have shown, the...

Hi Shiyu,

In the code you have shown, the boundary value is updated explicitly using the latest value of the internal field. So when the equation is solved after this, the boundary value does not...
Forum: OpenFOAM Running, Solving & CFD July 26, 2018, 11:33
Replies: 82
Views: 18,868
Posted By bigphil
Ah yes, that makes sense. The projection removes...

Ah yes, that makes sense. The projection removes the normal component but then the divergence takes only the normal component.

Hmnn actually, we can note the following equivalence: [(I - nn) \cdot...
Forum: OpenFOAM Running, Solving & CFD July 26, 2018, 05:33
Replies: 82
Views: 18,868
Posted By bigphil
Hi Tar, OK, I understand a bit better now. ...

Hi Tar,

OK, I understand a bit better now.


Why not? The divergence of a vector field is a scalar field.

You can explicitly calculate the term \nabla \cdot [(I - nn) \cdot (I - nn) \cdot...
Forum: OpenFOAM Running, Solving & CFD July 25, 2018, 10:45
Replies: 82
Views: 18,868
Posted By bigphil
Hi Tar, I am not quite sure what a...

Hi Tar,

I am not quite sure what a tangential Laplacian operator is (maybe it is like div(grad(PotE).T() ...?), but your proposed formulae/code look very strange to me.

I suggest you examine...
Forum: OpenFOAM Running, Solving & CFD July 24, 2018, 12:59
Replies: 82
Views: 18,868
Posted By bigphil
Hi Tar, Removing the "const" in this case...

Hi Tar,

Removing the "const" in this case will fix it; also, you could use boundaryField instead of boundaryFieldRef for the boundary of gradPotE. Both will act the same.

Philip
Forum: OpenFOAM Running, Solving & CFD July 24, 2018, 08:55
Replies: 82
Views: 18,868
Posted By bigphil
Your proposed code for applying a spatially...

Your proposed code for applying a spatially varying condition look fine to me.

As regards the tangential gradient at the boundary, OpenFOAM uses the tangential gradient at the closest cell-centre...
Forum: OpenFOAM Running, Solving & CFD July 23, 2018, 15:12
Replies: 82
Views: 18,868
Posted By bigphil
OK, I understand. Something like the...

OK, I understand.

Something like the following should work:

if
(
PotE.boundaryFieldRef()[patchID].type()
== fixedGradientFvPatchScalarField::typeName
)
{
Forum: OpenFOAM Running, Solving & CFD July 23, 2018, 12:56
Replies: 82
Views: 18,868
Posted By bigphil
Hi Tar, What are you trying to set as the...

Hi Tar,

What are you trying to set as the boundary gradient?
It is not clear to me what you are actually trying to do.

Philip
Forum: OpenFOAM Running, Solving & CFD July 20, 2018, 14:13
Replies: 82
Views: 18,868
Posted By bigphil
Hi Tar, Yep, it seems using boundaryFieldRef...

Hi Tar,

Yep, it seems using boundaryFieldRef is the correct thing to do, e.g. as discussed here link...
Forum: OpenFOAM Running, Solving & CFD November 8, 2017, 16:55
Replies: 82
Views: 18,868
Posted By bigphil
Hi Amir, OK, so if you intend to set the...

Hi Amir,

OK, so if you intend to set the value of omega at the patch faces then I suggest you use the fixedValue patch type (for your patch in 0/omega); then the code becomes more simple:


...
Forum: OpenFOAM Running, Solving & CFD November 8, 2017, 14:26
Replies: 82
Views: 18,868
Posted By bigphil
Hi Amir, The cleanest method would be to...

Hi Amir,

The cleanest method would be to write a new boundary condition for omega where you can directly update the boundary values for omega.

However, it is possible to do it by adding code to...
Forum: OpenFOAM Running, Solving & CFD November 8, 2017, 09:20
Replies: 82
Views: 18,868
Posted By bigphil
Hi Amir, Can you give your code that you...

Hi Amir,

Can you give your code that you have so far? And where are you inserting this code?

Philip
Forum: OpenFOAM Running, Solving & CFD May 29, 2017, 15:10
Replies: 82
Views: 18,868
Posted By bigphil
Hi Simone, This error: error: passing...

Hi Simone,

This error:

error: passing ‘const Foam::fvPatchField<double>’ as ‘this’ argument of ‘void Foam::fvPatchField<Type>::operator=(const Foam::UList<T>&) [with Type = double]’ discards...
Forum: OpenFOAM Running, Solving & CFD September 26, 2016, 11:28
Replies: 82
Views: 18,868
Posted By bigphil
You should not use the "==" operator; you should...

You should not use the "==" operator; you should use the "=" operator to assign the face value.

The "==" operator is just necessary when assigning the value to an entire fixedValue-type boundary...
Forum: OpenFOAM Running, Solving & CFD September 23, 2016, 09:06
Replies: 82
Views: 18,868
Posted By bigphil
Hi, Can you post your code segment? I...

Hi,

Can you post your code segment?

I think the problem is "snGrad()" returns a "tmp" of a field, so either you modify the code to be:

newPatchValues[i] =...
Forum: OpenFOAM Running, Solving & CFD June 26, 2015, 20:09
Replies: 82
Views: 18,868
Posted By bigphil
If you give the mathematics here that you are...

If you give the mathematics here that you are trying to implement and also your initial non-compiling implementation, then I can give you pointers on the implementation.


I'm not sure I...
Forum: OpenFOAM Running, Solving & CFD June 26, 2015, 19:09
Replies: 82
Views: 18,868
Posted By bigphil
fvPatchField::snGrad() return a tmp copy of a...

fvPatchField::snGrad() return a tmp copy of a scalarField (see OpenFOAM C++ doxygen documentation (http://foam.sourceforge.net/docs/cpp/a00870.html#aee44c456744b9ed5f206a9027bb93f8a)); so to get your...
Forum: OpenFOAM Running, Solving & CFD September 10, 2012, 15:17
Replies: 82
Views: 18,868
Posted By bigphil
Yes, sorry that was a typo. Best regards, ...

Yes, sorry that was a typo.

Best regards,
Philip
Forum: OpenFOAM Running, Solving & CFD September 10, 2012, 11:03
Replies: 82
Views: 18,868
Posted By bigphil
Hi Wei, To answer your first question, to...

Hi Wei,

To answer your first question, to calculate the full gradient (tensor) at the boundary face you use the fvc::grad operator as you have shown:
tensor faceCellGradientU =...
Forum: OpenFOAM Running, Solving & CFD August 30, 2012, 09:50
Replies: 82
Views: 18,868
Posted By bigphil
Hi Wei, You can set non-uniform boundary...

Hi Wei,

You can set non-uniform boundary values based on anything you want:

// find ID of patch
label patchID = mesh.boundaryMesh().findPatchID("patch_of_interest");
// check patch has been...
Showing results 1 to 25 of 27

 
Forum Jump

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