CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Electromagnetics (https://www.cfd-online.com/Forums/electromagnetics/)
-   -   Direction of B field and electric field in OpenFOAM (mhdFOAM) (https://www.cfd-online.com/Forums/electromagnetics/161215-direction-b-field-electric-field-openfoam-mhdfoam.html)

adkar October 20, 2015 06:53

Direction of B field and electric field in OpenFOAM (mhdFOAM)
 
I am a new OF user.
Could someone tell me how to determine the direction of magnetic field in openFOAM ? (Solver = mhdFOAM)
I cannot understand the direction of magnetic and electric field in the initial conditions folder (0 folder in the case folder)

Also, where is the direction of electric field given?

Thank you.

The following is the B file

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object B;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 0 -2 0 0 -1 0];

internalField uniform (0 20 0);

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

lowerWall
{
type fixedValue;
value uniform (0 20 0);
}

upperWall
{
type fixedValue;
value uniform (0 20 0);
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

And this is the pB file which is supposed to be the electric field

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object pB;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 1 -3 0 0 -1 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}

outlet
{
type fixedValue;
value uniform 0;
}

lowerWall
{
type zeroGradient;
}

upperWall
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

mechesanjiv April 26, 2016 00:02

Direction:
 
hello,
Please see while u give the value as in:

type fixedValue;
value uniform (0 20 0);

its written as X Y Z axis respectively, so in this case above 20T is given in Y direction in the boundary where you are applying ( which is lowerWall and upperWall in your example).

I hope this was the question you were asking!!

Regards,
Sanjiv


All times are GMT -4. The time now is 06:33.