Skip to content

False density initialization with several GPUs using FreeFormula? #635

@ssstuvz

Description

@ssstuvz

index

I have 3 GPUs in y (laser propagation direction)

namespace gasFreeFormula
    {
        namespace SI
        {
            struct GasProfile
            {
                /** Normalized Gas Profile [0.0:1.0]
                 *
                 * This formula should use SI quantities only!
                 * The normalized profile will be multiplied by GAS_DENSITY.
                 *
                 * @param pos vector with offset to the global (left top front) cell
                 * @return float_X between 0.0 and 1.0
                 */
                DINLINE float_64 operator()( floatD_64 pos )
                {
                    const float_64 x = pos.x() * 100.0; // m -> cm
                    const float_64 cell_width_cm = ::picongpu::SI::CELL_WIDTH_SI * 100.0;
                    const float_64 Length_X_cm = 384 * cell_width_cm;
                    const float_64 Center = Length_X_cm / 2.0;
                    const float_64 W0_cm = 5e-6 * 100.0;
                    const float_64 r = x-Center;
                    const float_64 Channel_Depth = 1.0/3.1415/2.818e-13/W0_cm/W0_cm;
                    const float_64 Density_cm = ::picongpu::SI::GAS_DENSITY_SI * 1e-6;


                        float_64 s = 0.1 + 0.9*sin(x/1e-4);
                    //float_64 s = 1.0 + Channel_Depth/Density_cm*r*r/W0_cm/W0_cm;

                    /* all parts of the function MUST be > 0 */
                    s *= float_64( s >= 0.0 );

                    return s;
                }
            };
        }
    }

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions