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

[swak4Foam] Boundary condition set using groovyBC or codedFixedValue

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

Like Tree3Likes
  • 1 Post By nlc
  • 1 Post By nlc
  • 1 Post By behzad-cfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2017, 16:49
Default Boundary condition set using groovyBC or codedFixedValue
  #1
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Hi dear foamers,

I want to solve \nabla^{2}\xi+\vec{n}\cdot\nabla\xi=0 equation and obtain B (magnetic flux density) that is defined like \overrightarrow{B}=(\frac{\partial\xi}{\partial y})\vec{e_{x}}-(\frac{\partial\xi}{\partial x})\vec{e_{y}}. actually the maxwell equations are rewritten based on vector potential \vec{A}=(\theta,\varsigma,\xi) that in 2D becomes \vec{A}=(0, 0, \xi) and . my reference paper is "Level set method for two-phase incompressible flows under magnetic fields" http://www.sciencedirect.com/science...10465510000226 .
I've implemented the equation in my base solver. Now i want to test functionality of the new solver but i have some boundary condition problem before testing.
For example if i want to get \overrightarrow{B}=(0,1) in boundaries i need to set (\frac{\partial\xi}{\partial y})=0 and -(\frac{\partial\xi}{\partial x})=1. is this condition my right boundary condition? correct me if I'm wrong.

How can i implement this BCs? am i had to code new BC?

Thanks in advance,

Last edited by behzad-cfd; November 19, 2017 at 06:52.
behzad-cfd is offline   Reply With Quote

Old   November 15, 2017, 03:36
Default
  #2
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Dear Nicolas any guidance is appreciated.

Last edited by behzad-cfd; November 19, 2017 at 07:20.
behzad-cfd is offline   Reply With Quote

Old   November 20, 2017, 04:34
Thumbs up
  #3
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Dear Behzad,

it seems that fixedNormalSlip will fit your requirements:
you will have tangential gradient component zero and the normal one equal to unity.

Please check Doxygen for more description at https://cpp.openfoam.org/v5/classFoa...d.html#details

An example:

Code:
Wall
{
    type        fixedNormalSlip;
    fixedValue  uniform (0 -1 0);
}
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   November 20, 2017, 06:04
Default
  #4
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Quote:
Originally Posted by makaveli_lcf View Post
Dear Behzad,

it seems that fixedNormalSlip will fit your requirements:
you will have tangential gradient component zero and the normal one equal to unity.

Please check Doxygen for more description at https://cpp.openfoam.org/v5/classFoa...d.html#details

An example:

Code:
Wall
{
    type        fixedNormalSlip;
    fixedValue  uniform (0 -1 0);
}
Hi Dr. Vakhrushev,

Thanks for your adequate reply. in your example I see fixedValue as vector but \xi is a scalarField. I used this type and got error complaining that fixedNormalSlip is unknown. but when I use with same solver for vectorField like U it works.

Any suggestion?
behzad-cfd is offline   Reply With Quote

Old   November 20, 2017, 06:46
Default
  #5
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Ohhh, sorry for misleading you. Fixed Normal Slip is something different.
Will reply you when I get the correct one.
In this example you can only limit your tangential gradient of Psi to zero, the normal option gives you a value, not a gradient!

Quote:
Originally Posted by behzad-cfd View Post
Hi Dr. Vakhrushev,

Thanks for your adequate reply. in your example I see fixedValue as vector but \xi is a scalarField. I used this type and got error complaining that fixedNormalSlip is unknown. but when I use with same solver for vectorField like U it works.

Any suggestion?
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   November 20, 2017, 07:41
Default
  #6
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
It's okay. I appreciate your effort to help me. waiting for your guidances dear Alexander.
Kind regards
behzad-cfd is offline   Reply With Quote

Old   November 20, 2017, 13:09
Default In 3D then 2D
  #7
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 16
nlc is on a distinguished road
Hi behzad-cfd,

I would you to clarify, the 3D equation you want to solve. Is it:
\nabla\cdot\nabla \vec{A}+\vec{n}\cdot\nabla\vec{A}=0

Then deduce \vec{B} field from \vec{A} using
\vec{B} = \nabla \times \vec{A}

So to solve finite volume vector field the field \vec{A} you need boundary condition on it.

Your boundary condition should be set on the tensor \nabla \vec{A} at the boundary, guessing with the value on \xi you gave:

\nabla \vec{A}|_{\partial\Omega} = 
\left[ {\begin{array}{ccc}    0 & 0 & -1  \\    0 & 0 & 0 \\ 1 & 0 & 0 \\   \end{array} } \right]
???


I'm I correct ? Sadly i don't have access to the paper you mentioned to verify for my self. It seam mote like you wish

So in the case you did the hole work of using 3D quantity \vec{A} you have to fix \vec{n} \cdot \nabla  \vec{A}|_{\partial\Omega} at the boundary.


2D

Now If my assumption are correct and if you are only interested in the component \xi of field \vec{A} this is a fix gradient boundary condition on \xi where \nabla\xi = [-1,0,0] at the BC provided you did not implemented \vec{A} but the scalar field \xi to solve only the "2D magnetic equation". Then \vec{B} is a 3D vector with component "z" always equal to zero. But \xi is a scalar and the boundary condition you set is \vec{n} \cdot \nabla\xi


I hope this help. But I'm not quit certain to understand your question properly.

I would need more clarification on the boundary you wish to set and access to the article in order to be of more help.

Last edited by nlc; November 20, 2017 at 17:08.
nlc is offline   Reply With Quote

Old   November 20, 2017, 14:24
Default
  #8
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Quote:
Originally Posted by nlc View Post
Hi behzad-cfd,

I would you to clarify, the 3D equation you want to solve. Is it:
\nabla\cdot\nabla \vec{A}+\vec{n}\cdot\nabla\vec{A}=0

Then deduce \vec{B} field from \vec{A} using
\vec{B} = \nabla \times \vec{A}

So to solve finite volume vector field the field \vec{A} you need boundary condition on it.

Your boundary condition should be set on the tensor \nabla \vec{A} at the boundary, guessing with the value on \xi you gave:

\nabla \vec{A}|_{\partial\Omega} = 
\left[ {\begin{array}{ccc}    0 & 0 & -1  \\    0 & 0 & 0 \\ 1 & 0 & 0 \\   \end{array} } \right]
???


I'm I correct ? Sadly i don't have access to the paper you mentioned to verify for my self. It seam mote like you wish

So in the case you did the hole work of using 3D quantity \vec{A} you have to fix \nabla  \vec{A}|_{\partial\Omega} \cdot \vec{n} at the boundary.


2D

Now If my assumption are correct and if you are only interested in the component \xi of field \vec{A} this is a fix gradient boundary condition on \xi where \nabla\xi = [-1,0,0] at the BC provided you did not implemented \vec{A} but the scalar field \xi to solve only the "2D magnetic equation". Then \vec{B} is a 3D vector with component "z" always equal to zero. But \xi is a scalar and the boundary condition you set is \nabla\xi\cdot \vec{n}


I hope this help. But I'm not quit certain to understand your question properly.

I would need more clarification on the boundary you wish to set and access to the article in order to be of more help.
Hi Nicolas,

It appears that i couldn't explain the problem well. I took some screen shots from equations section of paper. maybe it'll help to clarify the problem. the last picture is magnetic field lines. I would like to get uniform magnetic filed like that.

Regards,
Behzad
Attached Images
File Type: png 1_.png (22.4 KB, 31 views)
File Type: png 2_.png (83.4 KB, 26 views)
File Type: png 3_.png (9.0 KB, 21 views)
File Type: png 4_.png (116.5 KB, 21 views)
behzad-cfd is offline   Reply With Quote

Old   November 20, 2017, 17:36
Default
  #9
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 16
nlc is on a distinguished road
Quote:
Originally Posted by behzad-cfd View Post


...

For example if i want to get \overrightarrow{B}=(0,1) in boundaries i need to set (\frac{\partial\xi}{\partial y})=0 and -(\frac{\partial\xi}{\partial x})=1. is this condition my right boundary condition? correct me if I'm wrong.

How can i implement this BCs? am i had to code new BC?
It seam to me from your question that you don't need to implement new BC. For the \xi scalar field. If you want to set \vec{B}=(0,1,0) you do like you like written \nabla\xi=(-1,0,0). Meaning you use gradient boundary condition on your scalar field with the value \vec{n}\cdot\nabla\xi that you can calculate yourself.

One thing that can cause problem with this way of doing is that there is no reference value for \xi so this make the simulation less stable and can cause difficulty. In this regard you can set one of the BC (that is suppose to be homogeneous) to fix value 0 (in this case left or right).
behzad-cfd likes this.

Last edited by nlc; November 20, 2017 at 19:18.
nlc is offline   Reply With Quote

Old   November 20, 2017, 17:49
Default
  #10
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Quote:
Originally Posted by nlc View Post
It seam to me from your question that you don't need to implement new BC. For the \xi scalar field. If you want to set \vec{B}=(0,1,0) you do like you ave written \nabla\xi=(-1,0,0). Meaning you use gradient boundary condition on your scalar field with the value \vec{n}\cdot\nabla\xi that you can calculate yourself.

One thing that can cause problem with this way of doing is that there is no reference value for \xi so this make the simulation less stable and can cause difficulty. In this regard you can set one of the BC (that is suppose to be homogeneous) to fix value 0 (in this case left or right).
Yes exactly what i was trying to describe. you mean that i set zero reference value and do \frac{\partial \xi}{\partial x} on paper? and then set the values on boundary patch?
As far as i know there is not any boundary condition to calculate scalar gradient in vector form and give the tangential part. All of gradient BCs calculate patch normal gradient. am i correct?
behzad-cfd is offline   Reply With Quote

Old   November 20, 2017, 20:03
Arrow
  #11
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 16
nlc is on a distinguished road
Take a look at the tutorial:

surfaceTracking/bubbleInterTrackFoam/bubble2D_r0.75mm/

Code:
0/U:38:        gradient        uniform (0 0 0);
0/p:31:        gradient        uniform 0;
For U the gradient is not a tensor ! It is always the normal derivative to the boundary.

So for U (velocity) it is \vec{n} \cdot \nabla \vec{U} which is a vector !!
And for p (pressure) it is \vec{n} \cdot \nabla p which is a scalar !!

Mosley meaning that you can setup the entry BC for \xi

Code:
        gradient        uniform -1;
the exit

Code:
        fixedValue;     
        uniform 0;
and bottom and top

Code:
        gradient        uniform 0;
Now I said "Mosley meaning" because there is still a difference between setting a fixed value to force a gradient and using a gradient. Not count discretization difference, as long as you are far from disturbed field it is equivalent. You could also, for the entry, use a fixed value from the value of the gradient you want and the distance from the exit boundary. Now you might need to verify in your set of equation if you are allow to have a negative \xi !! (Just in case you do some special stuff)

Hope this is clear now. You'd be kind to provide a picture of the result.

Now if you want to create your own BC and use \vec{B} to setup \xi you can. Use the mathematical relation we discussed to set up the correct BC. But if I'd be you I'd do it in 3D from the start and apply it to \vec{A} once you write the 3D version of the solver. (Just an opinion)
nlc is offline   Reply With Quote

Old   November 20, 2017, 20:35
Default
  #12
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Quote:
Originally Posted by nlc View Post
Take a look at the tutorial:

surfaceTracking/bubbleInterTrackFoam/bubble2D_r0.75mm/

Code:
0/U:38:        gradient        uniform (0 0 0);
0/p:31:        gradient        uniform 0;
For U the gradient is not a tensor ! It is always the normal derivative to the boundary.

So for U (velocity) it is \vec{n} \cdot \nabla \vec{U} which is a vector !!
And for p (pressure) it is \vec{n} \cdot \nabla p which is a scalar !!

Mosley meaning that you can setup the entry BC for \xi

Code:
        gradient        uniform -1;
the exit

Code:
        fixedValue;     
        uniform 0;
and bottom and top

Code:
        gradient        uniform 0;
Now I said "Mosley meaning" because there is still a difference between setting a fixed value to force a gradient and using a gradient. Not count discretization difference, as long as you are far from disturbed field it is equivalent. You could also, for the entry, use a fixed value from the value of the gradient you want and the distance from the exit boundary. Now you might need to verify in your set of equation if you are allow to have a negative \xi !! (Just in case you do some special stuff)

Hope this is clear now. You'd be kind to provide a picture of the result.

Now if you want to create your own BC and use \vec{B} to setup \xi you can. Use the mathematical relation we discussed to set up the correct BC. But if I'd be you I'd do it in 3D from the start and apply it to \vec{A} once you write the 3D version of the solver. (Just an opinion)
Dear Nicolas,
I know what do you mean. but \vec{n} \cdot \nabla \xi = -1 won't give us \vec{B} = (0, 1, 0). Let us test this condition for bottom boundary where we want to impose B = (0, 1, 0):
\vec{n} \cdot \nabla \xi = (0 ,1 ,0) \cdot (\frac{\partial\xi}{\partial x}, \frac{\partial\xi}{\partial y}, \frac{\partial\xi}{\partial z}) = \frac{\partial\xi}{\partial y} = -1 (1)

\vec{B} = (\frac{\partial\xi}{\partial y}, -\frac{\partial\xi}{\partial x}, 0) (2)

(1),(2)----> \vec{B} = (-1 ,someValue , 0)

For this reason I believe we should have tangential gradient value = -1 to get desired B field.
behzad-cfd is offline   Reply With Quote

Old   November 20, 2017, 22:22
Default
  #13
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 16
nlc is on a distinguished road
No wrong boundary. You can send me your case if you want... Just think of the distribution (or the map) you want on \xi to have \vec{B}. There is a 90 degree rotation between \nabla\xi and \vec{B}. You want \vec{B}=(0,1,0)

you do this with
\nabla \xi = (-1 ,0 ,0)

So BC are :

On
\vec{n} = (1,0,0)
\vec{n} \cdot \nabla \xi = (1 ,0 ,0) \cdot \nabla\xi = -1

On
\vec{n} = (0,1,0)
\vec{n} \cdot \nabla \xi = (0 ,1 ,0) \cdot \nabla\xi = 0

I'm not sure I understand your confusion.

Do you wish to use \vec{B} ??
If you really want to use
\vec{B} to set up \xi you would have to solve \vec{B}= \nabla \times \vec{A} for \vec{A}


For the time being you can simply think of the map
\xi you need to have the value \vec{B} you want.

With the BC I suggest, you have what you want. If you think about it on 2 side of the box you have a normal gradient and on the other 2 boundary you have a variation tangent to the boundary !!! Like you wish just not by imposing it on the same boundary ! You could setup a "tangent" BC by fixing value on the boundary by building your own BC. But this seam to me like looking for trouble. If you really want to do this I suggest you start testing and compiling your BC before asking how to do it. You can find tutorial and documentation ...
behzad-cfd likes this.

Last edited by nlc; November 21, 2017 at 00:48.
nlc is offline   Reply With Quote

Old   November 21, 2017, 04:10
Default
  #14
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Quote:
Originally Posted by nlc View Post
No wrong boundary. You can send me your case if you want... Just think of the distribution (or the map) you want on \xi to have \vec{B}. There is a 90 degree rotation between \nabla\xi and \vec{B}. You want \vec{B}=(0,1,0)

you do this with
\nabla \xi = (-1 ,0 ,0)

So BC are :

On
\vec{n} = (1,0,0)
\vec{n} \cdot \nabla \xi = (1 ,0 ,0) \cdot \nabla\xi = -1

On
\vec{n} = (0,1,0)
\vec{n} \cdot \nabla \xi = (0 ,1 ,0) \cdot \nabla\xi = 0

I'm not sure I understand your confusion.

Do you wish to use \vec{B} ??
If you really want to use
\vec{B} to set up \xi you would have to solve \vec{B}= \nabla \times \vec{A} for \vec{A}


For the time being you can simply think of the map
\xi you need to have the value \vec{B} you want.

With the BC I suggest, you have what you want. If you think about it on 2 side of the box you have a normal gradient and on the other 2 boundary you have a variation tangent to the boundary !!! Like you wish just not by imposing it on the same boundary ! You could setup a "tangent" BC by fixing value on the boundary by building your own BC. But this seam to me like looking for trouble. If you really want to do this I suggest you start testing and compiling your BC before asking how to do it. You can find tutorial and documentation ...
Ok thank you Nicolas. I'll test your suggested BC and report the results here.

Best regards
nlc likes this.
behzad-cfd is offline   Reply With Quote

Old   December 4, 2017, 21:36
Default
  #15
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 16
nlc is on a distinguished road
Quote:
Originally Posted by behzad-cfd View Post
Ok thank you Nicolas. I'll test your suggested BC and report the results here.

Best regards
What was the result of the boundary condition I have sugested you try ??
nlc is offline   Reply With Quote

Old   December 5, 2017, 05:33
Default
  #16
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Hi Nicolas,

Sorry about the delay. I had some issues with my solver. I was about to send the results.
BTW here you are.

First picture:
ksi boundary condition:

Code:
bottom
    {
        type            fixedValue;
        value           uniform 0;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 0;
    }

    rightWall
    {
        type            fixedGradient;
        gradient        uniform -1;
    }

    leftWall
    {
        type            fixedGradient;
        gradient        uniform -1;
   
    }

    defaultFaces
    {
        type            empty;
    }
Second picture:
Code:
bottom
    {
        type            fixedValue;
        value           uniform 0;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 0;
    }

    rightWall
    {
        type            zeroGradient;
    }

    leftWall
    {
        type            fixedGradient;
        gradient        uniform -1;
   
    }

    defaultFaces
    {
        type            empty;
    }
Third picture:

Code:
bottom
    {
        type            fixedGradient;
        gradient        uniform -1;
    }

    outlet
    {
       type            zeroGradient;
    }

    rightWall
    {
        type            fixedValue;
        value           uniform 0;
    }

    leftWall
    {
        type            fixedValue;
        value           uniform 0;
   
    }

    defaultFaces
    {
        type            empty;
    }
As you can see this boundary conditions doesn't give me the desired results. I think i should code my custom BC.
If i finished I'll report the results here.

Kind Regards,
Behzad
Attached Images
File Type: png 1.png (143.7 KB, 16 views)
File Type: png 2.png (142.6 KB, 21 views)
File Type: png 3.png (151.2 KB, 20 views)
behzad-cfd is offline   Reply With Quote

Old   December 5, 2017, 14:49
Default
  #17
nlc
Member
 
nlc's Avatar
 
Nicolas Lussier Clément
Join Date: Apr 2009
Location: Montréal, Qc, Canada
Posts: 61
Rep Power: 16
nlc is on a distinguished road
Try this and show me the result please. Has this is the boundary condition I was trying to describe to you. Obviously it seam I was not clear enough. This boundary condition will give you a \nabla \xi uniform of magnitude 1 and directed towards the outlet. Understanding that outlet is the top boundary condition. Finally according to your equation it should give you an horizontal magnetic field. If you do not get it there is something wrong

Code:
    bottom
    {
        type            fixedValue;
        value           uniform 0;
    }

    outlet
    {
        type            fixedGradient;
        gradient        uniform -1;
     }

    rightWall
    {
        type            zeroGradient;
    }

    leftWall
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
Alternatively you can chose this BC which will give you the same field at a scalar factor, which is related to the distance between the BC bottom and outlet.

Code:
    bottom
    {
        type            fixedValue;
        value           uniform 0;
    }

    outlet
    {
        type              fixedValue;
        gradient        uniform -1;
     }

    rightWall
    {
        type            zeroGradient;
    }

    leftWall
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
If this dos not work I offer you to test it myself providing you send me your test case with solver code.


As an end remark your result seam to be coherent with the \xi profile. If you plot the value of \xi field and think of the implication of the equation you describe you'll understand what I mean.

Regards
nlc is offline   Reply With Quote

Old   December 19, 2017, 13:30
Default
  #18
Member
 
behzad Ghasemi
Join Date: Sep 2013
Location: Iran
Posts: 56
Rep Power: 12
behzad-cfd is on a distinguished road
Quote:
Originally Posted by nlc View Post
Try this and show me the result please. Has this is the boundary condition I was trying to describe to you. Obviously it seam I was not clear enough. This boundary condition will give you a \nabla \xi uniform of magnitude 1 and directed towards the outlet. Understanding that outlet is the top boundary condition. Finally according to your equation it should give you an horizontal magnetic field. If you do not get it there is something wrong

Code:
    bottom
    {
        type            fixedValue;
        value           uniform 0;
    }

    outlet
    {
        type            fixedGradient;
        gradient        uniform -1;
     }

    rightWall
    {
        type            zeroGradient;
    }

    leftWall
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
Alternatively you can chose this BC which will give you the same field at a scalar factor, which is related to the distance between the BC bottom and outlet.

Code:
    bottom
    {
        type            fixedValue;
        value           uniform 0;
    }

    outlet
    {
        type              fixedValue;
        gradient        uniform -1;
     }

    rightWall
    {
        type            zeroGradient;
    }

    leftWall
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
If this dos not work I offer you to test it myself providing you send me your test case with solver code.


As an end remark your result seam to be coherent with the \xi profile. If you plot the value of \xi field and think of the implication of the equation you describe you'll understand what I mean.

Regards
Hi dear Nicolas,
The problem solved and i got the uniform magnetic field by setting side walls as fixedGradient and top and bottom zeroGradiendt.
As you mentioned there is a 90 degree transformation in equations and i should have rotated BCs 90 degree to achieve desired field.

Kind regards,
Behzad
behzad-cfd is offline   Reply With Quote

Reply

Tags
bondary conditions, codedfixedvalue, groovybc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Ansys Licence Serve on Ubuntu 16.04 LTS david.pasquale ANSYS 2 January 20, 2017 12:52
several fields modified by single boundary condition schröder OpenFOAM Programming & Development 3 April 21, 2015 06:09
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 07:49
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


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