New Project Issues: Parameter has wrong number of components; key <parameter> has been read 1 time(s) less than it was present in the configuration tree

Hello all,
I’m trying to troubleshoot a OGS project my subgroup has been putting together, specifically it’s project file, and I’ve got quite stumped on two particular sets of error:

One of them is the displacement0 issue, where it’s unclear to me why it says displacement0 has the wrong number of components when it’s a vectorial quantity. (Switching it and all references to it to 1 component quite correctly gets “error: Number of components of the process variable ‘displacement’ is different from the displacement dimension: got 1, expected 3”)

Meanwhile, the key parameter issue has been just confounding. Parameter is definitely well-defined in the right place, I’ve checked the documentation quite a bit, but this is simply what happens when the project is run. Commenting out specific boundary conditions and source terms removes the corresponding critical error, and commenting them all makes the project file run, but, y’know, they’re kinda important.

I am going to try and attach the prototype .prj file itself in the first reply, probably by copying the text inside of a summary.

The .prj In Question <?xml version='1.0' encoding='ISO-8859-1'?> mesh_cube1-StructuredMesh.vtu cube_bottom1-StructuredMesh.vtu cube_top1-StructuredMesh.vtu cube_left1-StructuredMesh.vtu cube_right1-StructuredMesh.vtu
<processes>
    <process>
        <name>HM_NodalSourceTem</name>
        <type>HYDRO_MECHANICS</type>
        <integration_order>2</integration_order>
        <dimension>3</dimension>
        <constitutive_relation>
            <type>LinearElasticIsotropic</type>
            <youngs_modulus>E</youngs_modulus>
            <poissons_ratio>nu</poissons_ratio>
        </constitutive_relation>
        <process_variables>
            <displacement>displacement</displacement>
            <pressure>pressure</pressure>
        </process_variables>
        <specific_body_force>0 0 0</specific_body_force>
    </process>
</processes>

<time_loop>
    <processes>
        <process ref="HM_NodalSourceTem">
            <nonlinear_solver>basic_newton</nonlinear_solver>
            <convergence_criterion>
                <type>PerComponentDeltaX</type>
                <norm_type>NORM2</norm_type>
                <reltols>
					1e-12 1e-12 1e-12
					1e-12
				</reltols>
            </convergence_criterion>
            <time_discretization>
                <type>BackwardEuler</type>
            </time_discretization>
            <time_stepping>
                <type>FixedTimeStepping</type>
                <t_initial>0</t_initial>
                <t_end>10</t_end>
                <timesteps>
                    <pair>
                        <repeat>10000</repeat>
                        <delta_t>0.001</delta_t>
                    </pair>
                </timesteps>
            </time_stepping>
        </process>
    </processes>
    <output>
        <type>VTK</type>
        <prefix>HM_NodalSourceTem</prefix>
        <timesteps>
            <pair>
                <repeat>10</repeat>
                <each_steps>1000</each_steps>
            </pair>
        </timesteps>
        <variables>
            <variable>displacement</variable>
            <variable>pressure</variable>
        </variables>
    </output>
</time_loop>

<media>
    <medium id="0">
        <phases>
            <phase>
                <type>AqueousLiquid</type>
                <properties>
                    <property>
                        <name>viscosity</name>
                        <type>Constant</type>
                        <value>0.001</value>
                    </property>
                    <property>
                        <name>density</name>
                        <type>Constant</type>
                        <value>1000</value>
                    </property>
                </properties>
            </phase>
            <phase>
                <type>Solid</type>
                <properties>
                    <property>
                        <name>density</name>
                        <type>Constant</type>
                        <value>2500</value>
                    </property>
                </properties>
            </phase>
        </phases>
        <properties>
            <property>
                <name>porosity</name>
                <type>Constant</type>
                <value>0.1</value>
            </property>
            <property>
                <name>biot_coefficient</name>
                <type>Constant</type>
                <value>0.9</value>
            </property>
            <property>
                <name>reference_temperature</name>
                <type>Constant</type>
                <value>293.15</value>
            </property>
            <property>
                <name>permeability</name>
                <type>Constant</type>
                <value>0.00000000000001</value>
            </property>
        </properties>
    </medium>
</media>

<parameters>
    <parameter>
        <name>E</name>
        <type>Constant</type>
        <value>2.5e9</value>
    </parameter>
    <parameter>
        <name>nu</name>
        <type>Constant</type>
        <value>0.27</value>
    </parameter>
    <parameter>
        <name>displacement0</name>
        <type>Constant</type>
        <values>0 0 0</values>
    </parameter>
    <parameter>
        <name>pressure0</name>
        <type>Constant</type>
        <value>6000</value>
    </parameter>
    <parameter>
        <name>nodal_flux</name>
        <type>Constant</type>
        <value>0.0001</value>
    </parameter>
</parameters>

<process_variables>
    <process_variable>
        <name>displacement</name>
        <components>3</components>
        <order>2</order>
        <initial_condition>displacement0</initial_condition>
		<!-- -->
        <boundary_conditions>
            <boundary_condition>
                <mesh>cube_right1-StructuredMesh</mesh>
                <type>Dirichlet</type>
                <component>3</component>
                <parameter>displacement0</parameter> 
            </boundary_condition>
            <boundary_condition>
                <mesh>cube_bottom1-StructuredMesh</mesh>
                <type>Dirichlet</type>
                <component>3</component>
                <parameter>displacement0</parameter> 
            </boundary_condition>
            <boundary_condition>
                <mesh>cube_top1-StructuredMesh</mesh>
                <type>Dirichlet</type>
                <component>3</component>
				<parameter>displacement0</parameter> 
            </boundary_condition>
        </boundary_conditions>
		<!-- -->
    </process_variable>
    <process_variable>
        <name>pressure</name>
        <components>1</components>
        <order>1</order>
        <initial_condition>pressure0</initial_condition>
		<!-- -->
        <source_terms>
            <source_term>
                <mesh>cube_left1-StructuredMesh</mesh>
                <type>Nodal</type>                    
                <parameter>nodal_flux</parameter>
            </source_term>
        </source_terms>
		<!-- -->
    </process_variable>
</process_variables>

<nonlinear_solvers>
    <nonlinear_solver>
        <name>basic_newton</name>
        <type>Newton</type>
        <max_iter>50</max_iter>
        <linear_solver>general_linear_solver</linear_solver>
    </nonlinear_solver>
</nonlinear_solvers>

<linear_solvers>
    <linear_solver>
        <name>general_linear_solver</name>
        <lis>-i bicgstab -p ilu -tol 1e-16 -maxiter 10000</lis>
        <eigen>
            <solver_type>BiCGSTAB</solver_type>
            <precon_type>ILUT</precon_type>
            <max_iteration_step>10000</max_iteration_step>
            <error_tolerance>1e-10</error_tolerance>
        </eigen>
    </linear_solver>
</linear_solvers>

Hi!
The problem is with the components.
For the IC you are right, displacement0 should have 3 dimensions. However, for the BCs,
you specify individual components and these have only scalar values, ie. you need a second parameter with <value>0</value>.
Another thing, if you want to specify the 3rd component of the displacement vector you should set it to 2 instead of 3 as we start counting with 0.
Best
Jörg

Hello,
Thanks for the advice, setting up the scalar bc parameter fixed the component number issue, and then once I re-extracted the surfaces to fix a bulk nodes id map complaint the project started working. Problem solved! (It does really slowly but I can probably fix that myself).

One question, though: Not sure what you meant by setting it to 2 instead of 3, the component number input for the displacement process variable and its boundary conditions (and the pressure source term) seems to count from 1, 3 for the 3d initial condition and 1 for the scalar boundary conditions is what`s worked. I’m guessing you mean specifying somewhere else?

Thanks, Ethan

<components></components> under process variables is the total number of components. This should be for the displacement the same as your bulk dimensions.
<component></component> under boundary conditions specifies the specific component you want to set. In the 3d case it could be 0, 1 or 2. The component is scalar anyway; however, you need to set which component you mean. So originally, with 3 you were specifying the 4th component that did not exist. With 1 you specify the y component etc.

Ahh, thanks, that makes a lot of sense.