Page 1 of 1

assignment of primary fields missing

PostPosted: Thu Jul 28, 2016 11:40 am
by rwendner
At the moment the DiffusionProblem {} assumes that the first defined field is the temperature and the second defined field is the RH field - both the primary fields of a specific diffusion problem.
This is not necessarily clear to the user and potentially introduces problems in the future, e.g. if we operate with different diffusion material subroutines on the same fields.

Since we are using fieldlabels for everything else I suggest to have a mapping command - that links the available fields to the different materials.
Something like

Field Temperature T1 {
InitialValue 293 degK
CrankNicolsonTolerance 1e-9
EnableRate TR // Rate
}

Field RelativeHumidity RH1 {
InitialValue 0.999 1
CrankNicolsonTolerance 1e-9
EnableRate RHR //Rate
}

DiffusionMaterialFields diffmat1 { // concrete
TemperatureField T1
RelativeHumidityField RH1
}

DiffusionMaterialFields diffmat2 { // steel
TemperatureField T1
}

Re: assignment of primary fields missing

PostPosted: Thu Jul 28, 2016 4:55 pm
by zhouxinwei
Before we looking into this matter, there is one thing we need to settle first: if you plan to model concrete and steel in the same problem, how do you plan to model them together in the diffusion problem?

In current framework, all diffusion materials have to be the same type (we can use ones of the same type with different material parameters, but not different types), thus operating on the same fields.

Re: assignment of primary fields missing

PostPosted: Thu Jul 28, 2016 5:14 pm
by rwendner
agreed - this is a discussion that we have to have in the near future.

However, we should also avoid that a user modelling just concrete and defining first RH and T gets error messages because of the wrong sequences.
It's simply cleaner to clearly define the mapping.
The other issue with different material types is a second but not the only motivation.

Re: assignment of primary fields missing

PostPosted: Thu Jul 28, 2016 8:02 pm
by zhouxinwei
I updated the diffusion framework which removes the sequence requirements. No new input commands are needed, the framework will do the mapping automatically.

However, please contact Giovanni to check and fix a few things (see commit message in GitLab) before changing the sequence to be arbitrary. Before that, stick to the old sequence.