feat(surface): major work on implementing surface constraints in a presciption agnostic manner
This commit is contained in:
@@ -12,6 +12,8 @@ import :field.registry;
|
||||
import :utils.domain;
|
||||
|
||||
namespace {
|
||||
namespace eos = mean_field::eos;
|
||||
|
||||
using DomainSchema = mean_field::utils::domain::CoreEnvelopeVacuumDomainSchema;
|
||||
using ClosureDomain = mean_field::field::FieldDomainT<mean_field::field::Density>;
|
||||
|
||||
@@ -336,11 +338,21 @@ namespace {
|
||||
if (closureAction == ClosureAction::residual) {
|
||||
const double density = elementDensityInput * densityShape;
|
||||
|
||||
integrand = density - barotrope.density_from_enthalpy(baseEnthalpy);
|
||||
const double equationOfStateDensity =
|
||||
eos::evaluate<eos::quantity::Density>(barotrope, eos::SpecificEnthalpyValue{baseEnthalpy})
|
||||
.value();
|
||||
|
||||
integrand = density - equationOfStateDensity;
|
||||
} else {
|
||||
const double enthalpyVariation = elementEnthalpyVariation * enthalpyShape;
|
||||
|
||||
integrand = -barotrope.density_derivative_from_enthalpy(baseEnthalpy) * enthalpyVariation;
|
||||
const double densityDerivative =
|
||||
eos::partialDerivative<eos::quantity::Density, eos::quantity::SpecificEnthalpy>(
|
||||
barotrope, eos::SpecificEnthalpyValue{baseEnthalpy}
|
||||
)
|
||||
.value();
|
||||
|
||||
integrand = -densityDerivative * enthalpyVariation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -628,11 +640,14 @@ namespace mean_field::operators::kernels {
|
||||
|
||||
enthalpyElement.CalcShape(integrationPoint, enthalpyShape);
|
||||
|
||||
const double densityValue = elementBaseDensity * densityShape;
|
||||
const double densityValue = elementBaseDensity * densityShape;
|
||||
|
||||
const double enthalpyValue = elementBaseEnthalpy * enthalpyShape;
|
||||
const double enthalpyValue = elementBaseEnthalpy * enthalpyShape;
|
||||
|
||||
const double closureValue = densityValue - barotrope.density_from_enthalpy(enthalpyValue);
|
||||
const double equationOfStateDensity =
|
||||
eos::evaluate<eos::quantity::Density>(barotrope, eos::SpecificEnthalpyValue{enthalpyValue}).value();
|
||||
|
||||
const double closureValue = densityValue - equationOfStateDensity;
|
||||
|
||||
const double geometryActionValue = closureValue * mappingVariation.weight_variation;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user